Package org.jboss.fresh.vfs.impl.mem

Source Code of org.jboss.fresh.vfs.impl.mem.MemVFSStoreFactory

package org.jboss.fresh.vfs.impl.mem;

import org.jboss.fresh.vfs.VFSMeta;
import org.jboss.fresh.vfs.VFSStore;
import org.jboss.fresh.vfs.VFSStoreFactory;

import java.util.Properties;


public class MemVFSStoreFactory implements VFSStoreFactory {

    public VFSStore create(VFSMeta meta, Properties p) throws Exception {
        if (p == null)
            p = System.getProperties();

        String fsname = p.getProperty("memfs.name", "");
        if("".equals(fsname)) throw new RuntimeException("memfs.name property not specified - it is used to specify a required VFS name");

        VFSStore store = new MemVFSStore(meta, fsname);

        return store;
    }

}
TOP

Related Classes of org.jboss.fresh.vfs.impl.mem.MemVFSStoreFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.