public final class Factory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FACTORY_COMMENT_CHAR |
static String |
FACTORY_EXTENSION |
static String |
FACTORY_FILENAME |
protected List<String> |
modules |
protected ComponentsTree |
tree |
Modifier | Constructor and Description |
---|---|
protected |
Factory() |
protected |
Factory(File configDir) |
protected |
Factory(ZipInputStream zis) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDescriptorFiles(List descriptorFiles) |
protected boolean |
checkModuleName(String moduleName) |
void |
destroy() |
protected String |
doGetAlias(String path,
String relativeToPath) |
protected Object |
doLookup(String path,
String relativeToPath) |
static void |
doWork(FactoryWork work) |
static void |
doWork(FactoryWork work,
boolean profileWork) |
static String |
getAlias(String path) |
static Object |
getAlias(String path,
String relativeToPath) |
static Factory |
getFactory(File configDir)
Gets a factory for the specified configuration dir.
|
static Factory |
getFactory(ZipInputStream zis)
Get a factory from the specified input stream, equivalent to the typical directory structure.
|
List<String> |
getModules() |
ComponentsTree |
getTree() |
protected void |
init(File factoryDir) |
protected void |
init(ZipInputStream zis) |
protected List<DescriptorFile> |
initModuleFromDir(File moduleDir) |
protected List<DescriptorFile> |
initModuleFromJar(String moduleName) |
protected List<DescriptorFile> |
initModuleFromZip(File moduleZip) |
static Object |
lookup(String path) |
static Object |
lookup(String path,
String relativeToPath) |
protected void |
runWork(FactoryWork work,
boolean profile) |
public static final String FACTORY_FILENAME
public static final String FACTORY_EXTENSION
public static final String FACTORY_COMMENT_CHAR
protected ComponentsTree tree
protected Factory(File configDir) throws IOException
IOException
protected Factory(ZipInputStream zis) throws IOException
IOException
protected Factory()
public static Factory getFactory(File configDir)
configDir
- starting directorypublic static Factory getFactory(ZipInputStream zis)
zis
- Input stream to the zipped Factory config filesprotected void init(ZipInputStream zis) throws IOException
IOException
protected void init(File factoryDir) throws IOException
IOException
protected List<DescriptorFile> initModuleFromDir(File moduleDir) throws IOException
IOException
protected List<DescriptorFile> initModuleFromZip(File moduleZip) throws IOException
IOException
protected List<DescriptorFile> initModuleFromJar(String moduleName) throws IOException
IOException
protected void addDescriptorFiles(List descriptorFiles)
public void destroy()
public ComponentsTree getTree()
protected void runWork(FactoryWork work, boolean profile)
public static void doWork(FactoryWork work)
public static void doWork(FactoryWork work, boolean profileWork)
protected boolean checkModuleName(String moduleName)
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.