Class ForeignDescriptorImpl
java.lang.Object
org.glassfish.jersey.internal.inject.ForeignDescriptorImpl
- All Implemented Interfaces:
ForeignDescriptor
The descriptor holder for an externally provided DI providers. Using this interface DI provider is able to provider his own
descriptor which can be used and returned to the DI provider in further processing.
This is useful in the case of caching where an algorithm is able to store and subsequently provide for an injection the already resolved descriptor of the same value.
-
Constructor Summary
ConstructorsConstructorDescriptionForeignDescriptorImpl
(Object foreignDescriptor) Constructor accepts a descriptor of the DI provider and to be able to provide it in further processing.ForeignDescriptorImpl
(Object foreignDescriptor, Consumer<Object> disposeInstance) Constructor accepts a descriptor of the DI provider and to be able to provide it in further processing along with dispose mechanism to destroy the objects corresponding the givenforeign key
. -
Method Summary
-
Constructor Details
-
ForeignDescriptorImpl
Constructor accepts a descriptor of the DI provider and to be able to provide it in further processing.- Parameters:
foreignDescriptor
- DI provider's descriptor.
-
ForeignDescriptorImpl
Constructor accepts a descriptor of the DI provider and to be able to provide it in further processing along with dispose mechanism to destroy the objects corresponding the givenforeign key
.- Parameters:
foreignDescriptor
- DI provider's descriptor.
-
-
Method Details
-
get
Description copied from interface:ForeignDescriptor
Returns an object that can be cast on the side of DI provider to his descriptor.- Specified by:
get
in interfaceForeignDescriptor
- Returns:
- DI provider's descriptor.
-
dispose
Description copied from interface:ForeignDescriptor
Disposes this instance. All the PerLookup objects that were created for this instance will be destroyed after this object has been destroyed.- Specified by:
dispose
in interfaceForeignDescriptor
- Parameters:
instance
- The instance to destroy.
-
equals
-
hashCode
public int hashCode()
-