|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Contract public interface Services
Services is the registry for HK2 services. In earlier versions this was referred to as the Habitat.
Services can be dynamically added to this instance or looked up. Services can also be implicitly added to HK2 by annotating the class with the @Service annotation. Services are organized in a parent-child structure. Whenever services are being located, a parent search first algorithm is used.
| Method Summary | |
|---|---|
DynamicBinderFactory |
bindDynamically()
Allow dynamic additions to this service registry. |
Collection<Binding<?>> |
getBindings()
Retrieve the collection of all registered bindings in this instance as well as in the parent service instance(s). |
Collection<Binding<?>> |
getBindings(Descriptor descriptor)
Retrieve the collection of existing bindings in this as well as in parent service registries that matches the Descriptor. |
Collection<Binding<?>> |
getDeclaredBindings()
Retrieve the collection of all registered bindings in this, and only this, Services instance. |
Collection<Binding<?>> |
getDeclaredBindings(Descriptor descriptor)
Retrieve the collection of registered bindings in this, and only this, Services instance that match the Descriptor argument. |
Services |
getDefault()
Retrieves the default Services registry. |
Services |
getServices(String moduleName)
Retrieves the service registry given a module name. |
| Methods inherited from interface org.glassfish.hk2.Locator |
|---|
byType, byType, forContract, forContract, forContract |
| Method Detail |
|---|
Services getDefault()
Services getServices(String moduleName)
moduleName - the module name, or null for the default services registry
DynamicBinderFactory bindDynamically()
DynamicBinderFactory instance to add services after
this services has been initialized.Collection<Binding<?>> getDeclaredBindings()
Collection<Binding<?>> getDeclaredBindings(Descriptor descriptor)
Descriptor argument.
A Descriptor matches if it's attributes are equal, or specified as null.
A Descriptor with all null attributes will therefore match all services in this
services registry.
descriptor - the descriptor used for matching, or null for all
Collection<Binding<?>> getBindings()
Collection<Binding<?>> getBindings(Descriptor descriptor)
Descriptor.
A Descriptor matches if it's attributes are equal, or specified as null.
A Descriptor with all null attributes will therefore match all services in this
services registry.
descriptor - the descriptor used for matching, or null for all
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||