T
- This is the type produced by the cache and consumed by the cachepublic interface ActiveDescriptor<T> extends Descriptor, SingleCache<T>
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
Modifier and Type | Method and Description |
---|---|
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.
|
Type |
getImplementationType()
If known the Type of the implementation.
|
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
|
Annotation |
getScopeAsAnnotation()
Returns the scope as an
Annotation
implementation that this ActiveDescriptor belongs to |
boolean |
isReified()
This method returns true if this descriptor has been reified
(class loaded).
|
getAdvertisedContracts, getClassAnalysisName, getDescriptorType, getDescriptorVisibility, getImplementation, getLoader, getLocatorId, getMetadata, getName, getQualifiers, getRanking, getScope, getServiceId, isProxiable, isProxyForSameScope, setRanking
getCache, isCacheSet, releaseCache, setCache
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
Type getImplementationType()
getImplementationClass()
Set<Type> getContractTypes()
Annotation getScopeAsAnnotation()
Annotation
implementation that this ActiveDescriptor belongs toAnnotation
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 creationvoid dispose(T instance)
instance
- The instance to destroyCopyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.