Package | Description |
---|---|
org.glassfish.hk2.api | |
org.glassfish.hk2.internal | |
org.glassfish.hk2.utilities | |
org.glassfish.hk2.utilities.binding |
Modifier and Type | Method and Description |
---|---|
ActiveDescriptor<?> |
AOPProxyCtl.__getUnderlyingDescriptor()
This method returns the ActiveDescriptor underlying the
service for which this object is a proxy
|
<T> ActiveDescriptor<T> |
DynamicConfiguration.addActiveDescriptor(ActiveDescriptor<T> activeDescriptor)
This allows third party systems to add reified active descriptors to the system.
|
<T> ActiveDescriptor<T> |
DynamicConfiguration.addActiveDescriptor(ActiveDescriptor<T> activeDescriptor,
boolean requiresDeepCopy)
This allows third party systems to add reified active descriptors to the system.
|
<T> ActiveDescriptor<T> |
DynamicConfiguration.addActiveDescriptor(Class<T> rawClass)
This adds an active descriptor to the system based completely on the analysis
of the given class.
|
<T> ActiveDescriptor<T> |
DynamicConfiguration.bind(Descriptor key)
This method will bind the given descriptor to this Module.
|
<T> ActiveDescriptor<T> |
DynamicConfiguration.bind(Descriptor key,
boolean requiresDeepCopy)
This method will bind the given descriptor to this Module.
|
ActiveDescriptor<T> |
ServiceHandle.getActiveDescriptor()
Returns the ActiveDescriptor associated with this service handle
|
ActiveDescriptor<?> |
InstanceLifecycleEvent.getActiveDescriptor()
The active descriptor that is being used for the operation.
|
ActiveDescriptor<?> |
ServiceLocator.getBestDescriptor(Filter filter)
Gets the descriptor that best matches this filter, taking ranking
and service id into account
|
ActiveDescriptor<?> |
ValidationInformation.getCandidate()
The candidate descriptor for this operation
|
ActiveDescriptor<?> |
Injectee.getInjecteeDescriptor()
This returns the ActiveDescriptor of the injectee
if it is known
|
ActiveDescriptor<?> |
ServiceLocator.getInjecteeDescriptor(Injectee injectee)
This method will first find a descriptor for this injectee, and then
reify that descriptor.
|
ActiveDescriptor<?> |
ServiceLocator.reifyDescriptor(Descriptor descriptor)
Converts a descriptor to an ActiveDescriptor.
|
ActiveDescriptor<?> |
ServiceLocator.reifyDescriptor(Descriptor descriptor,
Injectee injectee)
Converts a descriptor to an ActiveDescriptor.
|
Modifier and Type | Method and Description |
---|---|
List<ActiveDescriptor<?>> |
TwoPhaseTransactionData.getAllAddedDescriptors()
Gets all ActiveDescriptors that will be added in this transaction
|
List<ActiveDescriptor<?>> |
TwoPhaseTransactionData.getAllRemovedDescriptors()
Gets all ActiveDescriptors that will be removed by this transaction
|
List<ActiveDescriptor<?>> |
ServiceLocator.getDescriptors(Filter filter)
Gets the list of descriptors that match the given filter
|
List<ActiveDescriptor<?>> |
Populator.populate()
This method will populate the service locator using the system classloader to
find the hk2-locator files from the default location of META-INF/hk2-locator/default.
|
List<ActiveDescriptor<?>> |
Populator.populate(DescriptorFileFinder fileFinder,
PopulatorPostProcessor... postProcessors)
This method can be used to populate the service locator with files that
have been written out using the
DescriptorImpl writeObject method. |
Modifier and Type | Method and Description |
---|---|
<T> ActiveDescriptor<T> |
DynamicConfiguration.addActiveDescriptor(ActiveDescriptor<T> activeDescriptor)
This allows third party systems to add reified active descriptors to the system.
|
<T> ActiveDescriptor<T> |
DynamicConfiguration.addActiveDescriptor(ActiveDescriptor<T> activeDescriptor,
boolean requiresDeepCopy)
This allows third party systems to add reified active descriptors to the system.
|
boolean |
Context.containsKey(ActiveDescriptor<?> descriptor)
Determines if this context has a value for the given key
|
void |
Context.destroyOne(ActiveDescriptor<?> descriptor)
This method is called when
ServiceHandle.destroy() method is called. |
<U> U |
Context.findOrCreate(ActiveDescriptor<U> activeDescriptor,
ServiceHandle<?> root)
Creates a contextual instance of this ActiveDescriptor by calling its
create method if there is no other matching contextual instance.
|
<T> T |
ServiceLocator.getService(ActiveDescriptor<T> activeDescriptor,
ServiceHandle<?> root)
|
<T> T |
ServiceLocator.getService(ActiveDescriptor<T> activeDescriptor,
ServiceHandle<?> root,
Injectee injectee)
This method should be called by code resolving injectee's on behalf of some
root service, usually by an implementation of
InjectionResolver.resolve(Injectee, ServiceHandle) . |
<T> ServiceHandle<T> |
ServiceLocator.getServiceHandle(ActiveDescriptor<T> activeDescriptor)
Gets a
ServiceHandle that can be used to get and destroy the service
described by the ActiveDescriptor . |
<T> ServiceHandle<T> |
ServiceLocator.getServiceHandle(ActiveDescriptor<T> activeDescriptor,
Injectee injectee)
Gets a
ServiceHandle that can be used to get and destroy the service
described by the ActiveDescriptor . |
Modifier and Type | Class and Description |
---|---|
class |
ConstantActiveDescriptor<T> |
Modifier and Type | Method and Description |
---|---|
boolean |
InheritableThreadContext.containsKey(ActiveDescriptor<?> descriptor) |
boolean |
PerThreadContext.containsKey(ActiveDescriptor<?> descriptor) |
void |
InheritableThreadContext.destroyOne(ActiveDescriptor<?> descriptor) |
void |
PerThreadContext.destroyOne(ActiveDescriptor<?> descriptor) |
<U> U |
InheritableThreadContext.findOrCreate(ActiveDescriptor<U> activeDescriptor,
ServiceHandle<?> root) |
<U> U |
PerThreadContext.findOrCreate(ActiveDescriptor<U> activeDescriptor,
ServiceHandle<?> root) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractActiveDescriptor<T>
This class can be used as a starting point for those writing their own
ActiveDescriptor.
|
class |
AliasDescriptor<T>
An active descriptor class that serves as an alias for another descriptor.
|
Modifier and Type | Method and Description |
---|---|
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 <T> ActiveDescriptor<T> |
ServiceLocatorUtilities.findOneDescriptor(ServiceLocator locator,
Descriptor descriptor)
Finds a descriptor in the given service locator.
|
ActiveDescriptor<T> |
AliasDescriptor.getDescriptor()
Get the descriptor being aliased.
|
ActiveDescriptor<T> |
ContextualInput.getDescriptor()
Returns the descriptor associated with this contextual creation
|
ActiveDescriptor<?> |
InjecteeImpl.getInjecteeDescriptor() |
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
ImmediateContext.containsKey(ActiveDescriptor<?> descriptor) |
void |
ImmediateContext.destroyOne(ActiveDescriptor<?> descriptor) |
<U> U |
ImmediateContext.findOrCreate(ActiveDescriptor<U> activeDescriptor,
ServiceHandle<?> root) |
void |
ImmediateErrorHandler.postConstructFailed(ActiveDescriptor<?> immediateService,
Throwable exception)
This is called whenever an immediate service fails in its constructor or
postConstruct method.
|
void |
ImmediateErrorHandler.preDestroyFailed(ActiveDescriptor<?> immediateService,
Throwable exception)
This is called whenever an immediate service fails in its preDestroy method.
|
void |
InjecteeImpl.setInjecteeDescriptor(ActiveDescriptor<?> injecteeDescriptor)
Sets the descriptor to be associated with this injectee
|
Constructor and Description |
---|
AliasDescriptor(ServiceLocator locator,
ActiveDescriptor<T> descriptor,
String contract,
String name)
Construct an AliasDescriptor.
|
ContextualInput(ActiveDescriptor<T> descriptor,
ServiceHandle<?> root)
The inputs from the
Context.findOrCreate(ActiveDescriptor, ServiceHandle)
method |
Modifier and Type | Method and Description |
---|---|
<T> ActiveDescriptor<T> |
AbstractBinder.addActiveDescriptor(ActiveDescriptor<T> activeDescriptor)
This allows third party systems to add reified active descriptors to the system.
|
<T> ActiveDescriptor<T> |
AbstractBinder.addActiveDescriptor(ActiveDescriptor<T> activeDescriptor,
boolean requiresDeepCopy) |
<T> ActiveDescriptor<T> |
AbstractBinder.addActiveDescriptor(Class<T> rawClass)
This adds an active descriptor to the system based completely on the analysis
of the given class.
|
<T> ActiveDescriptor<T> |
AbstractBinder.bind(Descriptor descriptor)
This method will bind the given descriptor to this Module.
|
<T> ActiveDescriptor<T> |
AbstractBinder.bind(Descriptor descriptor,
boolean requiresDeepCopy) |
Modifier and Type | Method and Description |
---|---|
<T> ActiveDescriptor<T> |
AbstractBinder.addActiveDescriptor(ActiveDescriptor<T> activeDescriptor)
This allows third party systems to add reified active descriptors to the system.
|
<T> ActiveDescriptor<T> |
AbstractBinder.addActiveDescriptor(ActiveDescriptor<T> activeDescriptor,
boolean requiresDeepCopy) |
Copyright © 2009–2019 Oracle Corporation. All rights reserved.