| Modifier and Type | Method and Description |
|---|---|
| public HK2Module | |
| public HK2Module | add(ModuleDefinition
ModuleDefinition representing the new module content info, boolean should the new module be resolved or not resolve)Registers a new DefaultModuleDefinition in this registry. |
| public void | addRepository(Repository
new repository to attach to this registry repository, int int value from 1 to 100 to specify the search order weight)Add a new |
| public void | addRepository(Repository
new repository to attach to this registry repository)Add a new |
| public ModulesRegistry | |
| public ServiceLocator | createServiceLocator()
Creates the default |
| public ServiceLocator | createServiceLocator(String
Determines which inhabitants descriptors are loaded.
(so that different parallel habitats can be
created over the same modules registry.) name)Creates a |
| public ServiceLocator | createServiceLocator(ServiceLocator serviceLocator, String name, List<PopulatorPostProcessor> postProcessors)
Creates a |
| public void | |
| public void | |
| public HK2Module | |
| public Collection | Returns: an umodifiable list of loaded modulesReturns the list of shared Modules registered in this instance. |
| public Collection | Returns: an umodifiable list of loaded modules having names that match the given nameReturns the list of shared Modules registered in this instance whose name matches the given name
The returned list will not include the modules defined in the ancestor
|
| public ClassLoader | Returns: class loader instancethe parent class loader for the returned class loader instance parent, Collection<ModuleDefinition> module definitions for all modules this classloader should be
capable of loading classes from defs)Returns a ClassLoader capable of loading classes from a set of modules identified by their module definition |
| public ClassLoader | Returns: class loader instancethe parent class loader for the returned class loader instance parent, Collection<ModuleDefinition> module definitions for all modules this classloader should be
capable of loading defs, URL[] urls to be added to the module classloader urls)Returns a ClassLoader capable of loading classes from a set of modules identified by their module definition and also load new urls. |
| public Iterable | Returns: a collection of modulethe service interface class serviceClass)Returns a collection of HK2Module containing at least one implementation of the passed service interface class. |
| public ClassLoader | |
| public <T> Iterable | |
| public HK2Module | getProvidingModule(String providerClassName)
Gets the |
| public Repository | Returns: the repository or null if not foundname of the repository to return name)Get a repository from the list of attached repositories |
| public <T> List | Returns: the list of providers of that service.the service interface serviceClass)Returns all running services implementation of the passed service interface |
| public HK2Module | Returns: the module instance or null if none can be foundthe module name name, String the module version. Caller should specify a correct version. version)Returns the |
| public HK2Module | Returns: the module instance or null if none can be foundthe module name name, String the module version. Caller should specify a correct version. version, boolean should the module be resolved or not resolve)Returns the |
| public HK2Module | Returns: theHK2Module instance implementing the package
name or null if not found.the requested implementation package name. packageName)Find and return a loaded HK2Module that has the package name in its list of exported interfaces. |
| public ServiceLocator | |
| public ServiceLocator | |
| public void | |
| public void | Returns: initialized HabitatDetermines which inhabitants descriptors are loaded.
(so that different parallel habitats can be
created over the same modules registry.) name, ServiceLocator Habitat to initialize, null if it should be created h, List<PopulatorPostProcessor> postProcessors)Populates a |
| public void | |
| public void | register(ModuleLifecycleListener
the listener implementation listener)Add a |
| public <T> void | registerRunningService(Class<T>
the service interface serviceClass, T the provider of that service. provider)Registers a running service, this is useful when other components need to have access to a provider of a service without having to create a new instance and initialize it. |
| public void | removeRepository(String
name of the repository to remove name)Remove a repository from the list of attached repositories to this instances. |
| public void | |
| public void | |
| public void | unregister(ModuleLifecycleListener
the listener to unregister listener)Removes an |
| public <T> boolean | unregisterRunningService(Class<T> serviceClass, T provider)
Removes a running service, this is useful when a service instance is no longer available as a provider of a service. |
| add | back to summary |
|---|---|
| public HK2Module add(ModuleDefinition info) throws ResolveError Registers a new DefaultModuleDefinition in this registry. Using this module
definition, the registry will be capable of created shared and private
| |
| add | back to summary |
|---|---|
| public HK2Module add(ModuleDefinition info, boolean resolve) throws ResolveError Registers a new DefaultModuleDefinition in this registry. Using this module
definition, the registry will be capable of created shared and private
| |
| addRepository | back to summary |
|---|---|
| public void addRepository(Repository repository, int weight) Add a new
| |
| addRepository | back to summary |
|---|---|
| public void addRepository(Repository repository) Add a new
| |
| createChild | back to summary |
|---|---|
| public ModulesRegistry createChild() Creates a new child | |
| createServiceLocator | back to summary |
|---|---|
| public ServiceLocator createServiceLocator() throws MultiException Creates the default | |
| createServiceLocator | back to summary |
|---|---|
| public ServiceLocator createServiceLocator(String name) throws MultiException Creates a
| |
| createServiceLocator | back to summary |
|---|---|
| public ServiceLocator createServiceLocator(ServiceLocator serviceLocator, String name, List<PopulatorPostProcessor> postProcessors) Creates a | |
| detachAll | back to summary |
|---|---|
| public void detachAll() Detaches all the modules from this registry. The modules are not deconstructed when calling this method. | |
| dumpState | back to summary |
|---|---|
| public void dumpState(PrintStream writer) | |
| find | back to summary |
|---|---|
| public HK2Module find(Class<T> clazz) Finds the
| |
| getModules | back to summary |
|---|---|
| public Collection Returns the list of shared Modules registered in this instance.
The returned list will not include the modules defined in the ancestor
| |
| getModules | back to summary |
|---|---|
| public Collection Returns the list of shared Modules registered in this instance whose name matches the given name
The returned list will not include the modules defined in the ancestor
| |
| getModulesClassLoader | back to summary |
|---|---|
| public ClassLoader getModulesClassLoader(ClassLoader parent, Collection<ModuleDefinition> defs) throws ResolveError Returns a ClassLoader capable of loading classes from a set of modules identified by their module definition
| |
| getModulesClassLoader | back to summary |
|---|---|
| public ClassLoader getModulesClassLoader(ClassLoader parent, Collection<ModuleDefinition> defs, URL[] urls) throws ResolveError Returns a ClassLoader capable of loading classes from a set of modules identified by their module definition and also load new urls.
| |
| getModulesProvider | back to summary |
|---|---|
| public Iterable Returns a collection of HK2Module containing at least one implementation of the passed service interface class. | |
| getParentClassLoader | back to summary |
|---|---|
| public ClassLoader getParentClassLoader() | |
| getProvidersClass | back to summary |
|---|---|
| public <T> Iterable | |
| getProvidingModule | back to summary |
|---|---|
| public HK2Module getProvidingModule(String providerClassName) Gets the | |
| getRepository | back to summary |
|---|---|
| public Repository getRepository(String name) Get a repository from the list of attached repositories
| |
| getRunningServices | back to summary |
|---|---|
| public <T> List Returns all running services implementation of the passed service interface | |
| makeModuleFor | back to summary |
|---|---|
| public HK2Module makeModuleFor(String name, String version) throws ResolveError Returns the
| |
| makeModuleFor | back to summary |
|---|---|
| public HK2Module makeModuleFor(String name, String version, boolean resolve) throws ResolveError Returns the
| |
| makeModuleFor | back to summary |
|---|---|
| public HK2Module makeModuleFor(String packageName) throws ResolveError Find and return a loaded HK2Module that has the package name in its list of exported interfaces.
| |
| newServiceLocator | back to summary |
|---|---|
| public ServiceLocator newServiceLocator() throws MultiException Creates an uninitialized | |
| newServiceLocator | back to summary |
|---|---|
| public ServiceLocator newServiceLocator(ServiceLocator parent) throws MultiException | |
| populateConfig | back to summary |
|---|---|
| public void populateConfig(ServiceLocator serviceLocator) throws MultiException | |
| populateServiceLocator | back to summary |
|---|---|
| public void populateServiceLocator(String name, ServiceLocator h, List<PopulatorPostProcessor> postProcessors) throws MultiException Populates a
Default
| |
| back to summary | |
|---|---|
| public void print(Logger logger) Print a Registry dump to the logger
| |
| register | back to summary |
|---|---|
| public void register(ModuleLifecycleListener listener) Add a
| |
| registerRunningService | back to summary |
|---|---|
| public <T> void registerRunningService(Class<T> serviceClass, T provider) Registers a running service, this is useful when other components need to have access to a provider of a service without having to create a new instance and initialize it.
| |
| removeRepository | back to summary |
|---|---|
| public void removeRepository(String name) Remove a repository from the list of attached repositories to
this instances. After this call, the
| |
| setParentClassLoader | back to summary |
|---|---|
| public void setParentClassLoader(ClassLoader parent) | |
| shutdown | back to summary |
|---|---|
| public void shutdown() Shuts down this module's registry, apply housekeeping tasks | |
| unregister | back to summary |
|---|---|
| public void unregister(ModuleLifecycleListener listener) Removes an
| |
| unregisterRunningService | back to summary |
|---|---|
| public <T> boolean unregisterRunningService(Class<T> serviceClass, T provider) Removes a running service, this is useful when a service instance is no longer available as a provider of a service. | |