Class AbstractEjbHandler
- java.lang.Object
-
- com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
-
- org.glassfish.ejb.deployment.annotation.handlers.AbstractEjbHandler
-
- All Implemented Interfaces:
org.glassfish.apf.AnnotationHandler
- Direct Known Subclasses:
SingletonHandler,StatefulHandler,StatelessHandler
public abstract class AbstractEjbHandler extends com.sun.enterprise.deployment.annotation.handlers.AbstractHandlerThis is an abstract class for EJB annotation handler. Concrete subclass handlers need to implements the following methods: public Class<? extends Annotation> getAnnotationType(); protected String getAnnotatedName(Annotation annotation ); protected boolean isValidEjbDescriptor(EjbDescriptor ejbDesc); Annotation annotation); protected EjbDescriptor createEjbDescriptor(String elementName, AnnotationInfo ainfo) throws AnnotationProcessorException; protected HandlerProcessingResult setEjbDescriptorInfo( EjbDescriptor ejbDesc, AnnotationInfo ainfo) throws AnnotationProcessorException;- Author:
- Shing Wai Chan
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.sun.enterprise.util.LocalStringManagerImpllocalStrings
-
Constructor Summary
Constructors Constructor Description AbstractEjbHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract EjbDescriptorcreateEjbDescriptor(String elementName, org.glassfish.apf.AnnotationInfo ainfo)Create a new EjbDescriptor for a given elementName and AnnotationInfo.protected voiddoDescriptionProcessing(String description, EjbDescriptor ejbDescriptor)protected voiddoMappedNameProcessing(String mappedName, EjbDescriptor ejbDesc)protected booleanexcludedFromImplementsClause(Class intf)protected abstract StringgetAnnotatedName(Annotation annotation)Return the name attribute of given annotation.protected abstract booleanisValidEjbDescriptor(EjbDescriptor ejbDesc, Annotation 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 org.glassfish.apf.HandlerProcessingResultsetBusinessAndHomeInterfaces(EjbDescriptor ejbDesc, org.glassfish.apf.AnnotationInfo ainfo)MessageDriven bean does not need to invoke this API.protected abstract org.glassfish.apf.HandlerProcessingResultsetEjbDescriptorInfo(EjbDescriptor ejbDesc, org.glassfish.apf.AnnotationInfo ainfo)Set Annotation information to Descriptor.-
Methods inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
getAnnotationType, getConnectorAnnotationTypes, getDefaultFailedResult, getDefaultProcessedResult, getEjbAndWebAnnotationTypes, getEjbAnnotationTypes, getInjectionMethodPropertyName, getInvalidAnnotatedElementHandlerResult, getOverallProcessingResult, getTypeDependencies, getWebAnnotationTypes, log, validateInjectionMethod
-
-
-
-
Method Detail
-
getAnnotatedName
protected abstract String getAnnotatedName(Annotation annotation)
Return the name attribute of given annotation.- Parameters:
annotation-- Returns:
- name
-
isValidEjbDescriptor
protected abstract boolean isValidEjbDescriptor(EjbDescriptor ejbDesc, Annotation annotation)
-
createEjbDescriptor
protected abstract EjbDescriptor createEjbDescriptor(String elementName, org.glassfish.apf.AnnotationInfo ainfo) throws org.glassfish.apf.AnnotationProcessorException
Create a new EjbDescriptor for a given elementName and AnnotationInfo.- Parameters:
elementName-ainfo-- Returns:
- a new EjbDescriptor
- Throws:
org.glassfish.apf.AnnotationProcessorException
-
setEjbDescriptorInfo
protected abstract org.glassfish.apf.HandlerProcessingResult setEjbDescriptorInfo(EjbDescriptor ejbDesc, org.glassfish.apf.AnnotationInfo ainfo) throws org.glassfish.apf.AnnotationProcessorException
Set Annotation information to Descriptor. This method will also be invoked for an existing descriptor with annotation as user may not specific a complete xml.- Parameters:
ejbDesc-ainfo-- Returns:
- HandlerProcessingResult
- Throws:
org.glassfish.apf.AnnotationProcessorException
-
processAnnotation
public org.glassfish.apf.HandlerProcessingResult processAnnotation(org.glassfish.apf.AnnotationInfo ainfo) throws org.glassfish.apf.AnnotationProcessorExceptionProcess 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
-
setBusinessAndHomeInterfaces
protected org.glassfish.apf.HandlerProcessingResult setBusinessAndHomeInterfaces(EjbDescriptor ejbDesc, org.glassfish.apf.AnnotationInfo ainfo) throws org.glassfish.apf.AnnotationProcessorException
MessageDriven bean does not need to invoke this API.- Parameters:
ejbDesc-ainfo- for error handling- Returns:
- HandlerProcessingResult
- Throws:
org.glassfish.apf.AnnotationProcessorException
-
excludedFromImplementsClause
protected boolean excludedFromImplementsClause(Class intf)
-
doDescriptionProcessing
protected void doDescriptionProcessing(String description, EjbDescriptor ejbDescriptor)
-
doMappedNameProcessing
protected void doMappedNameProcessing(String mappedName, EjbDescriptor ejbDesc)
-
-