org.glassfish.ejb.deployment.annotation.handlers
Class StatelessHandler

java.lang.Object
  extended by com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
      extended by org.glassfish.ejb.deployment.annotation.handlers.AbstractEjbHandler
          extended by org.glassfish.ejb.deployment.annotation.handlers.StatelessHandler
All Implemented Interfaces:
AnnotationHandler

@Service
public class StatelessHandler
extends AbstractEjbHandler

This handler is responsible for handling the javax.ejb.Stateless

Author:
Shing Wai Chan

Field Summary
 
Fields inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
ejbProvider, localStrings, logger
 
Constructor Summary
StatelessHandler()
          Creates a new instance of StatelessHandler
 
Method Summary
protected  EjbDescriptor createEjbDescriptor(java.lang.String elementName, AnnotationInfo ainfo)
          Create a new EjbDescriptor for a given elementName and AnnotationInfo.
protected  java.lang.String getAnnotatedName(java.lang.annotation.Annotation annotation)
          Return the name attribute of given annotation.
 java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationType()
           
protected  boolean isValidEjbDescriptor(EjbDescriptor ejbDesc, java.lang.annotation.Annotation annotation)
          Check if the given EjbDescriptor matches the given Annotation.
protected  HandlerProcessingResult setEjbDescriptorInfo(EjbDescriptor ejbDesc, AnnotationInfo ainfo)
          Set Annotation information to Descriptor.
 
Methods inherited from class org.glassfish.ejb.deployment.annotation.handlers.AbstractEjbHandler
doDescriptionProcessing, doMappedNameProcessing, excludedFromImplementsClause, processAnnotation, setBusinessAndHomeInterfaces
 
Methods inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
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
 

Constructor Detail

StatelessHandler

public StatelessHandler()
Creates a new instance of StatelessHandler

Method Detail

getAnnotationType

public java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationType()
Returns:
the annoation type this annotation handler is handling

getAnnotatedName

protected java.lang.String getAnnotatedName(java.lang.annotation.Annotation annotation)
Return the name attribute of given annotation.

Specified by:
getAnnotatedName in class AbstractEjbHandler
Parameters:
annotation -
Returns:
name

isValidEjbDescriptor

protected boolean isValidEjbDescriptor(EjbDescriptor ejbDesc,
                                       java.lang.annotation.Annotation annotation)
Check if the given EjbDescriptor matches the given Annotation.

Specified by:
isValidEjbDescriptor in class AbstractEjbHandler
Parameters:
ejbDesc -
annotation -
Returns:
boolean check for validity of EjbDescriptor

createEjbDescriptor

protected EjbDescriptor createEjbDescriptor(java.lang.String elementName,
                                            AnnotationInfo ainfo)
                                     throws AnnotationProcessorException
Create a new EjbDescriptor for a given elementName and AnnotationInfo.

Specified by:
createEjbDescriptor in class AbstractEjbHandler
Parameters:
elementName -
ainfo -
Returns:
a new EjbDescriptor
Throws:
AnnotationProcessorException

setEjbDescriptorInfo

protected HandlerProcessingResult setEjbDescriptorInfo(EjbDescriptor ejbDesc,
                                                       AnnotationInfo ainfo)
                                                throws 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.

Specified by:
setEjbDescriptorInfo in class AbstractEjbHandler
Parameters:
ejbDesc -
ainfo -
Returns:
HandlerProcessingResult
Throws:
AnnotationProcessorException


Copyright © 2012 GlassFish Community. All Rights Reserved.