|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- This is the type produced by the cache and consumed by the cachepublic interface ActiveDescriptor<T>
An ActiveDescriptor contains information about a Descriptor after it has been reified.
Most of the methods in an ActiveDescriptor cannot be called until the isReified method
return true. Prior to that the information is not yet known. ActiveDescriptors
can be reified with the ServiceLocator
.reifyDescriptor method.
ActiveDescriptors may also be provided to the system pre-reified, which is useful when the Service described may be produced by a third-party system. In this case the ActiveDescriptors create method must use the third-party system in order to create instances of the described service
Method Summary | |
---|---|
T |
create(ServiceHandle<?> root)
Creates an instance of the ActiveDescriptor. |
void |
dispose(T instance)
Disposes this instance. |
Set<Type> |
getContractTypes()
The set of types that this ActiveDescriptor must produce. |
Long |
getFactoryLocatorId()
If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. |
Long |
getFactoryServiceId()
If this ActiveDescriptor has DescriptorType of PROVIDE_METHOD then this field will return the ServiceId of its associated Factory service. |
Class<?> |
getImplementationClass()
The implementation class that should be used to generate new instances of this descriptor. |
List<Injectee> |
getInjectees()
Returns the full list of Injectees this class has. |
Set<Annotation> |
getQualifierAnnotations()
The full set of qualifiers that this ActiveDescriptor provides |
Class<? extends Annotation> |
getScopeAnnotation()
Returns the scope that this ActiveDescriptor belongs to |
boolean |
isReified()
This method returns true if this descriptor has been reified (class loaded). |
Methods inherited from interface org.glassfish.hk2.api.Descriptor |
---|
getAdvertisedContracts, getBaseDescriptor, getDescriptorType, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, setRanking |
Methods inherited from interface org.glassfish.hk2.api.SingleCache |
---|
getCache, isCacheSet, releaseCache, setCache |
Method Detail |
---|
boolean isReified()
Class<?> getImplementationClass()
If the class returned is a Factory, then the factory is used to create instances. In this case the system will get an instance of the factory and use it to create the instances
Set<Type> getContractTypes()
Class<? extends Annotation> getScopeAnnotation()
Set<Annotation> getQualifierAnnotations()
List<Injectee> getInjectees()
If this descriptor is describing a factory created type then this list must have zero length
Long getFactoryServiceId()
Long getFactoryLocatorId()
T create(ServiceHandle<?> root)
root
- The root service handle, which can be used
to associated all the PerLookup objects with this creation
void dispose(T instance)
instance
- The instance to destroy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |