Class AbstractAttributeHandler
- java.lang.Object
-
- com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
-
- org.glassfish.ejb.deployment.annotation.handlers.AbstractAttributeHandler
-
- All Implemented Interfaces:
AnnotationHandler
- Direct Known Subclasses:
AccessTimeoutHandler
,AfterBeginHandler
,AfterCompletionHandler
,AroundConstructHandler
,AroundInvokeHandler
,AsynchronousHandler
,BeforeCompletionHandler
,ConcurrencyManagementHandler
,ExcludeClassInterceptorsHandler
,ExcludeDefaultInterceptorsHandler
,InitHandler
,InterceptorsHandler
,LockHandler
,PostActivateHandler
,PrePassivateHandler
,RemoveHandler
,ScheduleHandler
,StatefulTimeoutHandler
,TimeoutHandler
,TransactionAttributeHandler
,TransactionManagementHandler
public abstract class AbstractAttributeHandler extends AbstractHandler
This is an abstract class encapsulate generic behaviour of annotation handler applying on Ejb Class. It will get the corresponding EjbDescriptors associated to the annotation on the given Ejb Class and then pass it to underlying processAnnotation method. Concrete subclass handlers need to implement the following: public Class<? extends Annotation> getAnnotationType(); protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException; It may also need to override the following: a) if other annotations need to be processed prior to given annotation: public Class<? extends Annotation>[] getTypeDependencies(); b) if the given annotation can be processed while processing another annotation protected boolean isDelegatee(); c) if we need to process for interceptor protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbInterceptorContext ejbInterceptorContext) throws AnnotationProcessorException; d) indicate the annotation support type inheritance protected boolean supportTypeIneritance();- Author:
- Shing Wai Chan
-
-
Field Summary
Fields Modifier and Type Field Description protected static LocalStringManagerImpl
localStrings
-
Fields inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
ejbProvider, logger
-
Fields inherited from interface org.glassfish.apf.AnnotationHandler
ANNOTATION_HANDLER_METADATA
-
-
Constructor Summary
Constructors Constructor Description AbstractAttributeHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
isDelegatee()
This indicates whether the annotation can be processed by delegation from the another annotation.HandlerProcessingResult
processAnnotation(AnnotationInfo ainfo)
Process a particular annotation which type is the same as the one returned by @see getAnnotationType().protected abstract HandlerProcessingResult
processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts)
Process Annotation with given EjbContexts.protected HandlerProcessingResult
processAnnotation(AnnotationInfo ainfo, EjbInterceptorContext ejbInterceptorContext)
Process Annotation with given InteceptorContext.protected boolean
supportTypeInheritance()
This indicates whether the annotation type should be processed for type level in super-class.-
Methods inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
getAnnotationType, getConnectorAnnotationTypes, getDefaultFailedResult, getDefaultProcessedResult, getEjbAndWebAnnotationTypes, getEjbAnnotationTypes, getInjectionMethodPropertyName, getInvalidAnnotatedElementHandlerResult, getOverallProcessingResult, getTypeDependencies, getWebAnnotationTypes, log, validateInjectionMethod
-
-
-
-
Field Detail
-
localStrings
protected static final LocalStringManagerImpl localStrings
-
-
Method Detail
-
processAnnotation
protected abstract HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts) throws AnnotationProcessorException
Process Annotation with given EjbContexts.- Parameters:
ainfo
-ejbContexts
-- Returns:
- HandlerProcessingResult
- Throws:
AnnotationProcessorException
-
processAnnotation
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbInterceptorContext ejbInterceptorContext) throws AnnotationProcessorException
Process Annotation with given InteceptorContext.- Parameters:
ainfo
-ejbInterceptorContext
-- Returns:
- HandlerProcessingResult
- Throws:
AnnotationProcessorException
-
processAnnotation
public HandlerProcessingResult processAnnotation(AnnotationInfo ainfo) throws AnnotationProcessorException
Process a particular annotation which type is the same as the one returned by @see getAnnotationType(). All information pertinent to the annotation and its context is encapsulated in the passed AnnotationInfo instance. This is a method in interface AnnotationHandler.- Parameters:
ainfo
- the annotation information- Throws:
AnnotationProcessorException
-
isDelegatee
protected boolean isDelegatee()
This indicates whether the annotation can be processed by delegation from the another annotation.
-
supportTypeInheritance
protected boolean supportTypeInheritance()
This indicates whether the annotation type should be processed for type level in super-class.
-
-