org.glassfish.ejb.deployment.annotation.handlers
Class SingletonHandler
java.lang.Object
com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
org.glassfish.ejb.deployment.annotation.handlers.AbstractEjbHandler
org.glassfish.ejb.deployment.annotation.handlers.SingletonHandler
- All Implemented Interfaces:
- AnnotationHandler
@Service
public class SingletonHandler
- extends AbstractEjbHandler
This handler is responsible for handling the javax.ejb.Singleton
- Author:
- Shing Wai Chan
| 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 |
SingletonHandler
public SingletonHandler()
getAnnotationType
public Class<? extends Annotation> getAnnotationType()
- Returns:
- the annoation type this annotation handler is handling
getAnnotatedName
protected String getAnnotatedName(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,
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(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.