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.
|
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()
Accessor for the overall configuration for DataNucleus.
|
MetaDataManager |
getMetaDataManager()
Accessor for the manager for persistence metadata information.
|
PluginManager |
getPluginManager()
Accessor for the manager for DataNucleus plugins.
|
TypeManager |
getTypeManager()
Accessor for manager for java types.
|
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)
NucleusContext
applyDefaultProperties
in interface NucleusContext
conf
- The configurationpublic void initialise()
NucleusContext
initialise
in interface NucleusContext
public void close()
NucleusContext
close
in interface NucleusContext
public ApiAdapter getApiAdapter()
getApiAdapter
in interface NucleusContext
public String getApiName()
NucleusContext
getApiName
in interface NucleusContext
public Configuration getConfiguration()
NucleusContext
getConfiguration
in interface NucleusContext
public PluginManager getPluginManager()
NucleusContext
getPluginManager
in interface NucleusContext
public MetaDataManager getMetaDataManager()
NucleusContext
getMetaDataManager
in interface NucleusContext
public boolean supportsORMMetaData()
supportsORMMetaData
in interface NucleusContext
public TypeManager getTypeManager()
NucleusContext
getTypeManager
in interface NucleusContext
public ClassLoaderResolver getClassLoaderResolver(ClassLoader primaryLoader)
NucleusContext
getClassLoaderResolver
in interface NucleusContext
primaryLoader
- Loader to use as the primary loader (or null)protected void logConfiguration()
protected abstract void logConfigurationDetails()
Copyright © 2019. All rights reserved.