Class AbstractAttributeHandler
java.lang.Object
com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
org.glassfish.ejb.deployment.annotation.handlers.AbstractAttributeHandler
- All Implemented Interfaces:
org.glassfish.apf.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 com.sun.enterprise.deployment.annotation.handlers.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
FieldsModifier and TypeFieldDescriptionprotected static final com.sun.enterprise.util.LocalStringManagerImplFields inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
ejbProvider, I18N, loggerFields inherited from interface org.glassfish.apf.AnnotationHandler
ANNOTATION_HANDLER_METADATA -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanThis indicates whether the annotation can be processed by delegation from the another annotation.org.glassfish.apf.HandlerProcessingResultprocessAnnotation(org.glassfish.apf.AnnotationInfo ainfo) Process a particular annotation which type is the same as the one returned by @see getAnnotationType().protected abstract org.glassfish.apf.HandlerProcessingResultprocessAnnotation(org.glassfish.apf.AnnotationInfo ainfo, com.sun.enterprise.deployment.annotation.context.EjbContext[] ejbContexts) Process Annotation with given EjbContexts.protected org.glassfish.apf.HandlerProcessingResultprocessAnnotation(org.glassfish.apf.AnnotationInfo ainfo, com.sun.enterprise.deployment.annotation.context.EjbInterceptorContext ejbInterceptorContext) Process Annotation with given InteceptorContext.protected booleanThis 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 Details
-
localStrings
protected static final com.sun.enterprise.util.LocalStringManagerImpl localStrings
-
-
Constructor Details
-
AbstractAttributeHandler
public AbstractAttributeHandler()
-
-
Method Details
-
processAnnotation
protected abstract org.glassfish.apf.HandlerProcessingResult processAnnotation(org.glassfish.apf.AnnotationInfo ainfo, com.sun.enterprise.deployment.annotation.context.EjbContext[] ejbContexts) throws org.glassfish.apf.AnnotationProcessorException Process Annotation with given EjbContexts.- Parameters:
ainfo-ejbContexts-- Returns:
- HandlerProcessingResult
- Throws:
org.glassfish.apf.AnnotationProcessorException
-
processAnnotation
protected org.glassfish.apf.HandlerProcessingResult processAnnotation(org.glassfish.apf.AnnotationInfo ainfo, com.sun.enterprise.deployment.annotation.context.EjbInterceptorContext ejbInterceptorContext) throws org.glassfish.apf.AnnotationProcessorException Process Annotation with given InteceptorContext.- Parameters:
ainfo-ejbInterceptorContext-- Returns:
- HandlerProcessingResult
- Throws:
org.glassfish.apf.AnnotationProcessorException
-
processAnnotation
public org.glassfish.apf.HandlerProcessingResult processAnnotation(org.glassfish.apf.AnnotationInfo ainfo) throws org.glassfish.apf.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:
org.glassfish.apf.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.
-