public abstract class AbstractNucleusContext extends Object implements NucleusContext
| Modifier and Type | Field and Description |
|---|---|
protected ApiAdapter |
apiAdapter
API adapter used by the context.
|
protected String |
classLoaderResolverClassName
Name of the class providing the ClassLoaderResolver.
|
protected Map<String,ClassLoaderResolver> |
classLoaderResolverMap
Map of the ClassLoaderResolver, keyed by the clr class and the primaryLoader name.
|
protected Configuration |
config
Configuration for this context.
|
protected MetaDataManager |
metaDataManager
MetaDataManager for handling the MetaData.
|
protected PluginManager |
pluginManager
Manager for plug-ins.
|
static Set<String> |
STARTUP_PROPERTIES |
protected TypeManager |
typeManager
Manager for java types.
|
| Constructor and Description |
|---|
AbstractNucleusContext(String apiName,
Map startupProps,
PluginManager pluginMgr) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyDefaultProperties(Configuration conf)
Method called when initialising the Configuration to load up defaults for the properties appropriate for this NucleusContext.
|
abstract void |
close()
Clear out resources for the supported services.
|
ApiAdapter |
getApiAdapter() |
String |
getApiName()
Accessor for the name of the API (JDO, JPA, etc).
|
ClassLoaderResolver |
getClassLoaderResolver(ClassLoader primaryLoader)
Accessor for a ClassLoaderResolver to use in resolving classes.
|
Configuration |
getConfiguration() |
MetaDataManager |
getMetaDataManager() |
PluginManager |
getPluginManager() |
TypeManager |
getTypeManager() |
void |
initialise()
Method to initialise the context for use.
|
protected void |
logConfiguration()
Method to log the configuration of this context.
|
protected abstract void |
logConfigurationDetails()
Convenience method so that extending implementations can log their own configuration.
|
boolean |
supportsORMMetaData() |
protected final Configuration config
protected final PluginManager pluginManager
protected MetaDataManager metaDataManager
protected final ApiAdapter apiAdapter
protected TypeManager typeManager
protected final String classLoaderResolverClassName
protected transient Map<String,ClassLoaderResolver> classLoaderResolverMap
public AbstractNucleusContext(String apiName, Map startupProps, PluginManager pluginMgr)
public void applyDefaultProperties(Configuration conf)
NucleusContextapplyDefaultProperties in interface NucleusContextconf - The configurationpublic void initialise()
NucleusContextinitialise in interface NucleusContextpublic abstract void close()
NucleusContextclose in interface NucleusContextpublic ApiAdapter getApiAdapter()
getApiAdapter in interface NucleusContextpublic String getApiName()
NucleusContextgetApiName in interface NucleusContextpublic Configuration getConfiguration()
getConfiguration in interface NucleusContextpublic PluginManager getPluginManager()
getPluginManager in interface NucleusContextpublic MetaDataManager getMetaDataManager()
getMetaDataManager in interface NucleusContextpublic boolean supportsORMMetaData()
supportsORMMetaData in interface NucleusContextpublic TypeManager getTypeManager()
getTypeManager in interface NucleusContextpublic ClassLoaderResolver getClassLoaderResolver(ClassLoader primaryLoader)
NucleusContextgetClassLoaderResolver in interface NucleusContextprimaryLoader - Loader to use as the primary loader (or null)protected void logConfiguration()
protected abstract void logConfigurationDetails()
Copyright © 2017. All rights reserved.