|
||||||||||
| 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. |
java.util.Collection<Binding<?>> |
getBindings()
Retrieve the collection of all existing bindings in this as well as in parent service registries. |
java.util.Collection<Binding<?>> |
getBindings(Descriptor descriptor)
Retrieve the collection of existing bindings in this as well as in parent service registries that matches the Descriptor. |
java.util.Collection<Binding<?>> |
getDeclaredBindings()
Retrieve the collection of all existing bindings in this, and only this, service registry. |
java.util.Collection<Binding<?>> |
getDeclaredBindings(Descriptor descriptor)
Retrieve the collection of existing bindings in this, and only this, service registry that matches the Descriptor. |
Services |
getDefault()
Retrieves the default Services registry. |
Services |
getServices(java.lang.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(java.lang.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.java.util.Collection<Binding<?>> getDeclaredBindings()
java.util.Collection<Binding<?>> getDeclaredBindings(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
java.util.Collection<Binding<?>> getBindings()
java.util.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 | |||||||||