| Modifier and Type | Method and Description |
|---|---|
DynamicConfiguration |
DynamicConfigurationService.createDynamicConfiguration()
Creates a dynamic configuration that can be used to add or remove values
to the system
|
| Modifier and Type | Method and Description |
|---|---|
private ActiveDescriptor<?> |
ConfigurationListener.addInstanceDescriptor(DynamicConfiguration config,
ActiveDescriptor<?> parent,
java.lang.String name,
java.lang.String type,
java.lang.Object bean) |
| Modifier and Type | Class and Description |
|---|---|
class |
TopicDistributionModule
This module can be used to enable the default HK2
implementation of Topic distribution.
|
| Modifier and Type | Class and Description |
|---|---|
class |
RunLevelServiceModule
This module can be used to enable the RunLevelService
in a system not using automatic service discovery.
|
| Modifier and Type | Class and Description |
|---|---|
class |
EnableLookupExceptionsModule
This module can be used to enable exceptions to be
thrown from getService API when a descriptor throws
an exception during reification or other errors.
|
class |
ImmediateScopeModule
This module can be used to enable the
Immediate scope
feature. |
class |
InheritableThreadScopeModule
This module can be used to enable the
InheritableThread scope
feature. |
class |
PerThreadScopeModule
This module can be used to enable the
PerThread scope
feature. |
| Modifier and Type | Method and Description |
|---|---|
static DynamicConfiguration |
ServiceLocatorUtilities.createDynamicConfiguration(ServiceLocator locator)
This method returns a
DynamicConfiguration for use with adding
and removing services to the given ServiceLocator. |
| Modifier and Type | Method and Description |
|---|---|
void |
Binder.bind(DynamicConfiguration config)
This method will be called by the
ServiceLocatorUtilities.bind(org.glassfish.hk2.api.ServiceLocator, Binder...) method for each
binder given. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractBinder
Skeleton implementation of injection binder with convenience methods for
binding definitions.
|
| Modifier and Type | Field and Description |
|---|---|
private DynamicConfiguration |
AbstractBinder.configuration |
| Modifier and Type | Method and Description |
|---|---|
private DynamicConfiguration |
AbstractBinder.configuration()
Get the active
binder factory instance used for
binding configuration. |
| Modifier and Type | Method and Description |
|---|---|
static void |
BindingBuilderFactory.addBinding(BindingBuilder<?> builder,
DynamicConfiguration configuration)
Add a binding represented by the binding builder to the HK2 dynamic configuration.
|
static void |
BindingBuilderFactory.addBinding(BindingBuilder<?> builder,
DynamicConfiguration configuration,
HK2Loader defaultLoader)
Add a binding represented by the binding builder to the HK2 dynamic configuration.
|
void |
AbstractBinder.bind(DynamicConfiguration configuration) |
(package private) abstract void |
AbstractBindingBuilder.complete(DynamicConfiguration configuration,
HK2Loader defaultLoader)
Build the binding descriptor and bind it in the
dynamic configuration. |
(package private) void |
AbstractBindingBuilder.ClassBasedBindingBuilder.complete(DynamicConfiguration configuration,
HK2Loader defaultLoader) |
(package private) void |
AbstractBindingBuilder.InstanceBasedBindingBuilder.complete(DynamicConfiguration configuration,
HK2Loader defaultLoader) |
(package private) void |
AbstractBindingBuilder.FactoryInstanceBasedBindingBuilder.complete(DynamicConfiguration configuration,
HK2Loader defaultLoader) |
(package private) void |
AbstractBindingBuilder.FactoryTypeBasedBindingBuilder.complete(DynamicConfiguration configuration,
HK2Loader defaultLoader) |
| Modifier and Type | Class and Description |
|---|---|
class |
DynamicConfigurationImpl
The system implementation of the DynamicConfiguration service
|
| Modifier and Type | Method and Description |
|---|---|
DynamicConfiguration |
DynamicConfigurationServiceImpl.createDynamicConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
private void |
HK2Runner.addServicesFromDefault(DynamicConfiguration config,
java.util.Set<java.lang.String> excludes,
java.util.Set<java.lang.String> locatorFiles) |
private void |
HK2Runner.addServicesFromPackage(DynamicConfiguration config,
java.util.List<java.lang.String> packages,
java.util.Set<java.lang.String> excludes) |
private void |
HK2Runner.addServicesFromPathDirectory(DynamicConfiguration config,
java.util.List<java.lang.String> packages,
java.io.File directory,
java.util.Set<java.lang.String> excludes) |
private void |
HK2Runner.addServicesFromPathElement(DynamicConfiguration config,
java.util.List<java.lang.String> packages,
java.lang.String element,
java.util.Set<java.lang.String> excludes) |
private void |
HK2Runner.addServicesFromPathJar(DynamicConfiguration config,
java.util.List<java.lang.String> packages,
java.io.File jar,
java.util.Set<java.lang.String> excludes) |
void |
ServiceLocatorTestRule.bind(DynamicConfiguration dynamicConfiguration)
Called at the appropriate time by the
ServiceLocatorTestRule.configureServiceLocator(ServiceLocator, Description) method in
case subclasses wish to add services to the ServiceLocator being configured. |
private void |
ServiceLocatorTestRule.bind(DynamicConfiguration configuration,
java.lang.reflect.AnnotatedElement element)
Retrieves any
Annotations found on the supplied
AnnotatedElement and calls the ServiceLocatorTestRule.bind(DynamicConfiguration, Collection) method supplying them as
the second parameter. |
private static void |
ServiceLocatorTestRule.bind(DynamicConfiguration configuration,
java.io.BufferedReader reader)
Reads the
HK2 locator file represented by the supplied
BufferedReader and binds the
Descriptors it represents. |
private void |
ServiceLocatorTestRule.bind(DynamicConfiguration configuration,
Classes classes)
Binds all
Classes "reachable" from the supplied Classes annotation. |
private void |
ServiceLocatorTestRule.bind(DynamicConfiguration configuration,
java.util.Collection<? extends java.lang.annotation.Annotation> annotations)
Recursively examines the
Annotations supplied looking for
instances of the Classes, InhabitantFiles and
Packages annotations, and, using the binding methods on
the supplied DynamicConfiguration binds Descriptors for those "reachable" classes into the
configuration. |
private static void |
ServiceLocatorTestRule.bind(DynamicConfiguration configuration,
InhabitantFiles inhabitantFiles)
Gathers all classpath resource names found in the supplied
InhabitantFiles annotation representing HK2 locator files and
calls the ServiceLocatorTestRule.bind(DynamicConfiguration, String) method for
each such entry found. |
private void |
ServiceLocatorTestRule.bind(DynamicConfiguration configuration,
Packages packages)
Binds all
Classes "reachable" from packages described by
the supplied Packages annotation. |
private void |
ServiceLocatorTestRule.bind(DynamicConfiguration configuration,
java.util.Set<java.lang.String> packageNames)
Binds all
Classes "reachable" from the supplied packages. |
private static void |
ServiceLocatorTestRule.bind(DynamicConfiguration configuration,
java.lang.String locatorResourceName)
Using the context
ClassLoader, gets all classpath resources
with the supplied locatorResourceName, and iterates
through them, calling the ServiceLocatorTestRule.bind(DynamicConfiguration,
URL) method for each one. |
private static void |
ServiceLocatorTestRule.bind(DynamicConfiguration configuration,
java.net.URL locatorResource)
Opens an
InputStream
to the supplied URL, wraps a BufferedReader
around it, and calls the ServiceLocatorTestRule.bind(DynamicConfiguration,
BufferedReader) method. |
void |
HK2TestModule.configure(DynamicConfiguration config)
Allows the test to easily configure their test
|
private void |
HK2Runner.internalAddServicesFromDefault(DynamicConfiguration config,
java.util.Set<java.lang.String> excludes,
java.util.Set<java.lang.String> locatorFiles) |
private void |
HK2Runner.internalAddServicesFromPackage(DynamicConfiguration config,
java.util.List<java.lang.String> packages,
java.util.Set<java.lang.String> excludes) |
private void |
HK2Runner.readResources(java.util.Enumeration<java.net.URL> resources,
java.util.Set<java.lang.String> excludes,
DynamicConfiguration config) |