Class AbstractNucleusContext

    • Field Detail

      • config

        protected final Configuration config
        Configuration for this context.
      • pluginManager

        protected final PluginManager pluginManager
        Manager for plug-ins.
      • metaDataManager

        protected MetaDataManager metaDataManager
        MetaDataManager for handling the MetaData.
      • apiAdapter

        protected final ApiAdapter apiAdapter
        API adapter used by the context.
      • typeManager

        protected TypeManager typeManager
        Manager for java types.
      • classLoaderResolverClassName

        protected final String classLoaderResolverClassName
        Name of the class providing the ClassLoaderResolver.
      • classLoaderResolverMap

        protected transient Map<String,​ClassLoaderResolver> classLoaderResolverMap
        Map of the ClassLoaderResolver, keyed by the clr class and the primaryLoader name.

        public static final Set<String> STARTUP_PROPERTIES
    • Constructor Detail

      • AbstractNucleusContext

        public AbstractNucleusContext​(String apiName,
                                      Map startupProps,
                                      PluginManager pluginMgr)
    • Method Detail

      • applyDefaultProperties

        public void applyDefaultProperties​(Configuration conf)
        Description copied from interface: NucleusContext
        Method called when initialising the Configuration to load up defaults for the properties appropriate for this NucleusContext.
        Specified by:
        applyDefaultProperties in interface NucleusContext
        conf - The configuration
      • initialise

        public void initialise()
        Description copied from interface: NucleusContext
        Method to initialise the context for use. If any services are considered essential for operation then they will be enabled here, otherwise left for lazy initialisation.
        Specified by:
        initialise in interface NucleusContext
      • close

        public void close()
        Description copied from interface: NucleusContext
        Clear out resources for the supported services.
        Specified by:
        close in interface NucleusContext
      • getClassLoaderResolver

        public ClassLoaderResolver getClassLoaderResolver​(ClassLoader primaryLoader)
        Description copied from interface: NucleusContext
        Accessor for a ClassLoaderResolver to use in resolving classes. Caches the resolver for the specified primary loader, and hands it out if present.
        Specified by:
        getClassLoaderResolver in interface NucleusContext
        primaryLoader - Loader to use as the primary loader (or null)
        The ClassLoader resolver
      • logConfiguration

        protected void logConfiguration()
        Method to log the configuration of this context.
      • logConfigurationDetails

        protected abstract void logConfigurationDetails()
        Convenience method so that extending implementations can log their own configuration.