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.AbstractHandler
This 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 final com.sun.enterprise.util.LocalStringManagerImpl
     

    Fields inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler

    ejbProvider, I18N, logger

    Fields inherited from interface org.glassfish.apf.AnnotationHandler

    ANNOTATION_HANDLER_METADATA
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract EjbDescriptor
    createEjbDescriptor(String elementName, org.glassfish.apf.AnnotationInfo ainfo)
    Create a new EjbDescriptor for a given elementName and AnnotationInfo.
    protected void
    doDescriptionProcessing(String description, EjbDescriptor ejbDescriptor)
     
    protected void
     
    protected boolean
     
    protected abstract String
    Return the name attribute of given annotation.
    protected abstract boolean
     
    org.glassfish.apf.HandlerProcessingResult
    processAnnotation(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.HandlerProcessingResult
    setBusinessAndHomeInterfaces(EjbDescriptor ejbDesc, org.glassfish.apf.AnnotationInfo ainfo)
    MessageDriven bean does not need to invoke this API.
    protected abstract org.glassfish.apf.HandlerProcessingResult
    setEjbDescriptorInfo(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • localStrings

      protected static final com.sun.enterprise.util.LocalStringManagerImpl localStrings
  • Constructor Details

    • AbstractEjbHandler

      public AbstractEjbHandler()
  • Method Details

    • 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.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
    • 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)