Modifier and Type | Method and Description |
---|---|
abstract ServiceLocator |
ServiceLocatorFactory.create(String name)
Creates (or finds) a ServiceLocator.
|
abstract ServiceLocator |
ServiceLocatorFactory.create(String name,
ServiceLocator parent)
Creates or finds a ServiceLocator.
|
abstract ServiceLocator |
ServiceLocatorFactory.create(String name,
ServiceLocator parent,
ServiceLocatorGenerator generator)
Creates or finds a ServiceLocator.
|
abstract ServiceLocator |
ServiceLocatorFactory.create(String name,
ServiceLocator parent,
ServiceLocatorGenerator generator,
ServiceLocatorFactory.CreatePolicy policy)
Creates a ServiceLocator.
|
abstract ServiceLocator |
ServiceLocatorFactory.find(String name)
Finds the ServiceLocator with this name
|
ServiceLocator |
ServiceLocator.getParent()
Gets the parent service locator for this locator
|
Modifier and Type | Method and Description |
---|---|
abstract ServiceLocator |
ServiceLocatorFactory.create(String name,
ServiceLocator parent)
Creates or finds a ServiceLocator.
|
abstract ServiceLocator |
ServiceLocatorFactory.create(String name,
ServiceLocator parent,
ServiceLocatorGenerator generator)
Creates or finds a ServiceLocator.
|
abstract ServiceLocator |
ServiceLocatorFactory.create(String name,
ServiceLocator parent,
ServiceLocatorGenerator generator,
ServiceLocatorFactory.CreatePolicy policy)
Creates a ServiceLocator.
|
abstract void |
ServiceLocatorFactory.destroy(ServiceLocator locator)
Removes the given ServiceLocator
|
void |
ServiceLocatorListener.locatorAdded(ServiceLocator added)
This method is called whenever a ServiceLocator has been
added to the set of ServiceLocators.
|
void |
ServiceLocatorListener.locatorDestroyed(ServiceLocator destroyed)
This method is called whenever a ServiceLocator will be
removed from the set of ServiceLocators.
|
DescriptorImpl |
PopulatorPostProcessor.process(ServiceLocator serviceLocator,
DescriptorImpl descriptorImpl)
This method can be used to alter the descriptor read in.
|
Modifier and Type | Method and Description |
---|---|
void |
ServiceLocatorListener.initialize(Set<ServiceLocator> initialLocators)
This method returns the complete list of named service
locators at the time that this listener is registered.
|
Modifier and Type | Method and Description |
---|---|
static void |
ConfigurationUtilities.enableConfigurationSystem(ServiceLocator locator)
Enables the Configuration subsystem of HK2.
|
Modifier and Type | Method and Description |
---|---|
static void |
ManagerUtilities.enableConfigurationHub(ServiceLocator locator)
This method will add the Hub service to the given service locator.
|
Modifier and Type | Method and Description |
---|---|
static void |
PropertyFileUtilities.enablePropertyFileService(ServiceLocator locator)
This class adds the system implementation of
PropertyFileService
to the given service locator. |
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
ServiceLocatorGenerator.create(String name,
ServiceLocator parent)
Creates the ServiceLocator that will be used to
generate the ServiceLocators
|
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
ServiceLocatorGenerator.create(String name,
ServiceLocator parent)
Creates the ServiceLocator that will be used to
generate the ServiceLocators
|
Modifier and Type | Method and Description |
---|---|
static void |
ExtrasUtilities.bridgeServiceLocator(ServiceLocator into,
ServiceLocator from)
This method will bridge all non-local services from the
from ServiceLocator into the into ServiceLocator.
|
static void |
ExtrasUtilities.enableDefaultInterceptorServiceImplementation(ServiceLocator locator)
This method adds in a default implementation of the
InterceptionService
which uses annotations to denote which services should intercept other services. |
static void |
ExtrasUtilities.enableOperations(ServiceLocator locator)
This method adds in the infrastructure necessary to enable HK2 Operations support.
|
static void |
ExtrasUtilities.enableTopicDistribution(ServiceLocator locator)
This method will enable the default topic distribution service.
|
static void |
ExtrasUtilities.unbridgeServiceLocator(ServiceLocator into,
ServiceLocator from)
This method will remove all non-local services from the
from ServiceLocator into the into ServiceLocator.
|
Modifier and Type | Method and Description |
---|---|
void |
Hk2BridgeImpl.setRemote(ServiceLocator remote) |
Constructor and Description |
---|
CrossOverDescriptor(ServiceLocator local,
ActiveDescriptor<T> localService) |
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
ServiceLocatorFactoryImpl.create(String name) |
ServiceLocator |
ServiceLocatorFactoryImpl.create(String name,
ServiceLocator parent) |
ServiceLocator |
ServiceLocatorFactoryImpl.create(String name,
ServiceLocator parent,
ServiceLocatorGenerator generator) |
ServiceLocator |
ServiceLocatorFactoryImpl.create(String name,
ServiceLocator parent,
ServiceLocatorGenerator generator,
ServiceLocatorFactory.CreatePolicy policy) |
ServiceLocator |
ServiceLocatorFactoryImpl.find(String name) |
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
ServiceLocatorFactoryImpl.create(String name,
ServiceLocator parent) |
ServiceLocator |
ServiceLocatorFactoryImpl.create(String name,
ServiceLocator parent,
ServiceLocatorGenerator generator) |
ServiceLocator |
ServiceLocatorFactoryImpl.create(String name,
ServiceLocator parent,
ServiceLocatorGenerator generator,
ServiceLocatorFactory.CreatePolicy policy) |
void |
ServiceLocatorFactoryImpl.destroy(ServiceLocator locator) |
Modifier and Type | Method and Description |
---|---|
static void |
RunLevelServiceUtilities.enableRunLevelService(ServiceLocator locator)
Enables the RunLevelService in the given
ServiceLocator . |
Modifier and Type | Method and Description |
---|---|
static int |
Utilities.getRunLevelMode(ServiceLocator locator,
Descriptor descriptor,
Integer modeOverride)
Get the run level mode from the metadata of the given descriptor.
|
static int |
Utilities.getRunLevelValue(ServiceLocator locator,
Descriptor descriptor)
Get the run level value from the metadata of the given descriptor.
|
Modifier and Type | Method and Description |
---|---|
static ServiceLocator |
ServiceLocatorUtilities.bind(Binder... binders)
This method will create or find a ServiceLocator with the name "default" and
bind all of the binders given together in a single config transaction.
|
static ServiceLocator |
ServiceLocatorUtilities.bind(String name,
Binder... binders)
This method will create or find a ServiceLocator with the given name and
bind all of the binders given together in a single config transaction.
|
static ServiceLocator |
ServiceLocatorUtilities.createAndPopulateServiceLocator()
This method is often the first line of a stand-alone client that wishes to use HK2.
|
static ServiceLocator |
ServiceLocatorUtilities.createAndPopulateServiceLocator(String name)
This method is often the first line of a stand-alone client that wishes to use HK2.
|
Modifier and Type | Method and Description |
---|---|
static List<ActiveDescriptor<?>> |
ServiceLocatorUtilities.addClasses(ServiceLocator locator,
boolean idempotent,
Class<?>... toAdd)
It is very often the case that one wishes to add classes that hk2
will automatically analyze for contracts and qualifiers to
a service locator.
|
static List<ActiveDescriptor<?>> |
ServiceLocatorUtilities.addClasses(ServiceLocator locator,
Class<?>... toAdd)
It is very often the case that one wishes to add classes that hk2
will automatically analyze for contracts and qualifiers to
a service locator.
|
static List<FactoryDescriptors> |
ServiceLocatorUtilities.addFactoryConstants(ServiceLocator locator,
Factory<?>... constants)
This method adds factory constants to the given locator.
|
static List<FactoryDescriptors> |
ServiceLocatorUtilities.addFactoryDescriptors(ServiceLocator locator,
boolean requiresDeepCopy,
FactoryDescriptors... factories)
Adds the given factory descriptors to the service locator
|
static List<FactoryDescriptors> |
ServiceLocatorUtilities.addFactoryDescriptors(ServiceLocator locator,
FactoryDescriptors... factories)
Adds the given factory descriptors to the service locator
|
static <T> ActiveDescriptor<T> |
ServiceLocatorUtilities.addOneConstant(ServiceLocator locator,
Object constant)
This method adds one existing object to the given service locator.
|
static <T> ActiveDescriptor<T> |
ServiceLocatorUtilities.addOneConstant(ServiceLocator locator,
Object constant,
String name,
Type... contracts)
This method adds one existing object to the given service locator.
|
static <T> ActiveDescriptor<T> |
ServiceLocatorUtilities.addOneDescriptor(ServiceLocator locator,
Descriptor descriptor)
It is very often the case that one wishes to add a single descriptor to
a service locator.
|
static <T> ActiveDescriptor<T> |
ServiceLocatorUtilities.addOneDescriptor(ServiceLocator locator,
Descriptor descriptor,
boolean requiresDeepCopy)
It is very often the case that one wishes to add a single descriptor to
a service locator.
|
static void |
ServiceLocatorUtilities.bind(ServiceLocator locator,
Binder... binders)
This method will bind all of the binders given together in a
single config transaction.
|
static DynamicConfiguration |
ServiceLocatorUtilities.createDynamicConfiguration(ServiceLocator locator)
This method returns a
DynamicConfiguration for use with adding
and removing services to the given ServiceLocator . |
static void |
ServiceLocatorUtilities.dumpAllDescriptors(ServiceLocator locator)
Dumps all descriptors in this ServiceLocator to stderr
|
static void |
ServiceLocatorUtilities.dumpAllDescriptors(ServiceLocator locator,
PrintStream output)
Dumps all descriptors in this ServiceLocator to the given PrintStream
|
static void |
ServiceLocatorUtilities.enableImmediateScope(ServiceLocator locator)
This method will add the ability to use the
Immediate scope to
the given locator. |
static ImmediateController |
ServiceLocatorUtilities.enableImmediateScopeSuspended(ServiceLocator locator)
This method will add the ability to use the
Immediate scope to
the given locator. |
static void |
ServiceLocatorUtilities.enableInheritableThreadScope(ServiceLocator locator)
This method will add the ability to use the
InheritableThread
scope to the given locator. |
static void |
ServiceLocatorUtilities.enableLookupExceptions(ServiceLocator locator)
This method will cause lookup operations to throw exceptions when
exceptions are encountered in underlying operations such as
classloading.
|
static void |
ServiceLocatorUtilities.enablePerThreadScope(ServiceLocator locator)
This method will add the ability to use the
PerThread scope to
the given locator. |
static void |
ServiceLocatorUtilities.enableTopicDistribution(ServiceLocator locator)
Deprecated.
Use ExtrasUtilities.enableTopicDistribution. This method WILL BE REMOVED
in the next version of hk2
|
static <T> ActiveDescriptor<T> |
ServiceLocatorUtilities.findOneDescriptor(ServiceLocator locator,
Descriptor descriptor)
Finds a descriptor in the given service locator.
|
static <T> T |
ServiceLocatorUtilities.findOrCreateService(ServiceLocator locator,
Class<T> type,
Annotation... qualifiers)
This method will first attempt to find a service corresponding to the type and qualifiers
passed in to the method, and if one is found simply returns it.
|
static <T> T |
ServiceLocatorUtilities.getService(ServiceLocator locator,
Descriptor descriptor)
Returns the service in this service locator given the current descriptor.
|
static <T> T |
ServiceLocatorUtilities.getService(ServiceLocator locator,
String className)
Returns the best service matching the passed in fully qualified
class name of the service
|
DescriptorImpl |
ClassLoaderPostProcessor.process(ServiceLocator serviceLocator,
DescriptorImpl descriptorImpl) |
DescriptorImpl |
DuplicatePostProcessor.process(ServiceLocator serviceLocator,
DescriptorImpl descriptorImpl) |
static void |
ServiceLocatorUtilities.removeFilter(ServiceLocator locator,
Filter filter)
Removes all the descriptors from the given locator that match the
given filter
|
static void |
ServiceLocatorUtilities.removeFilter(ServiceLocator locator,
Filter filter,
boolean includeAliasDescriptors)
Removes all the descriptors from the given locator that match the
given filter
|
static void |
ServiceLocatorUtilities.removeOneDescriptor(ServiceLocator locator,
Descriptor descriptor)
This method will attempt to remove descriptors matching the passed in descriptor from
the given locator.
|
static void |
ServiceLocatorUtilities.removeOneDescriptor(ServiceLocator locator,
Descriptor descriptor,
boolean includeAliasDescriptors)
This method will attempt to remove descriptors matching the passed in descriptor from
the given locator.
|
Constructor and Description |
---|
AliasDescriptor(ServiceLocator locator,
ActiveDescriptor<T> descriptor,
String contract,
String name)
Construct an AliasDescriptor.
|
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
ServiceLocatorGeneratorImpl.create(String name,
ServiceLocator parent) |
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
ServiceLocatorGeneratorImpl.create(String name,
ServiceLocator parent) |
Modifier and Type | Method and Description |
---|---|
abstract void |
GuiceBridge.initializeGuiceBridge(ServiceLocator locator)
This method will initialize the given service locator for use with the Guice/HK2
bridge.
|
Constructor and Description |
---|
HK2IntoGuiceBridge(ServiceLocator locator)
Creates the
HK2IntoGuiceBridge TypeLocator that must
be bound into the Module with a call to bindListener. |
Modifier and Type | Method and Description |
---|---|
void |
GuiceBridgeImpl.initializeGuiceBridge(ServiceLocator locator) |
Constructor and Description |
---|
HK2ToGuiceTypeListenerImpl(ServiceLocator locator)
Creates the
HK2IntoGuiceBridge TypeLocator that must
be bound into the Module with a call to bindListener. |
Modifier and Type | Class and Description |
---|---|
class |
ServiceLocatorImpl |
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
ServiceLocatorImpl.getParent() |
Modifier and Type | Method and Description |
---|---|
static ActiveDescriptor<ServiceLocator> |
Utilities.getLocatorDescriptor(ServiceLocator locator)
Returns a constant ActiveDescriptor for the basic ServiceLocator
|
Modifier and Type | Method and Description |
---|---|
static ActiveDescriptor<ServiceLocator> |
Utilities.getLocatorDescriptor(ServiceLocator locator)
Returns a constant ActiveDescriptor for the basic ServiceLocator
|
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
SpringScopeImpl.getServiceLocator()
Returns the
ServiceLocator associated with this
scope |
Modifier and Type | Method and Description |
---|---|
abstract void |
SpringBridge.initializeSpringBridge(ServiceLocator locator)
This method will initialize the given service locator for use with the Spring/HK2
bridge.
|
void |
SpringScopeImpl.setServiceLocator(ServiceLocator locator)
Sets the service locator to use with this scope
|
Modifier and Type | Method and Description |
---|---|
void |
SpringBridgeImpl.initializeSpringBridge(ServiceLocator locator) |
Modifier and Type | Field and Description |
---|---|
protected ServiceLocator |
HK2Runner.testLocator
Test classes can use this service locator as their private test locator
|
Modifier and Type | Method and Description |
---|---|
static ServiceLocator |
HK2TestUtilities.create(String name,
HK2TestModule... modules) |
static ServiceLocator |
HK2TestUtilities.create(String name,
ServiceLocator parent,
HK2TestModule... modules)
Will create a ServiceLocator after doing test-specific bindings from the TestModule
|
protected ServiceLocator |
ServiceLocatorTestRule.createServiceLocator(org.junit.runner.Description testDescription)
Creates and returns a
ServiceLocator suitable for the
JUnit test described by the supplied Description . |
Modifier and Type | Method and Description |
---|---|
protected void |
ServiceLocatorTestRule.configureServiceLocator(ServiceLocator serviceLocator,
org.junit.runner.Description testDescription)
Configures the supplied
ServiceLocator for use by the
test described by the supplied Description . |
static ServiceLocator |
HK2TestUtilities.create(String name,
ServiceLocator parent,
HK2TestModule... modules)
Will create a ServiceLocator after doing test-specific bindings from the TestModule
|
protected void |
ServiceLocatorTestRule.performDependencyInjection(ServiceLocator serviceLocator,
T test)
Performs HK2 dependency injection on this
ServiceLocatorTestRule and the supplied test instance, using the
supplied ServiceLocator as needed. |
Constructor and Description |
---|
ClassVisitorImpl(ServiceLocator locator,
boolean verbose,
Set<String> excludes)
Creates this with the config to add to if this is a service
|
Copyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.