com.sun.enterprise.deployment.annotation.handlers
Class RunAsHandler

java.lang.Object
  extended by com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
      extended by com.sun.enterprise.deployment.annotation.handlers.RunAsHandler
All Implemented Interfaces:
AnnotationHandler

@Service
public class RunAsHandler
extends AbstractHandler

This handler is responsible for handling the javax.annotation.security.RunAs.

Author:
Shing Wai Chan

Field Summary
 
Fields inherited from class com.sun.enterprise.deployment.annotation.handlers.AbstractHandler
ejbProvider, localStrings, logger
 
Constructor Summary
RunAsHandler()
           
 
Method Summary
 java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationType()
           
 java.lang.Class<? extends java.lang.annotation.Annotation>[] getTypeDependencies()
           
 HandlerProcessingResult processAnnotation(AnnotationInfo ainfo)
          Process a particular annotation which type is the same as the one returned by @see getAnnotationType().
protected  HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, EjbContext[] ejbContexts)
          Process Annotation with given EjbContexts.
protected  HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, WebBundleContext webBundleContext)
          Process Annotation with given WebBundleContext.
protected  HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, WebComponentContext[] webCompContexts)
          Process Annotation with given WebCompContexts.
protected  boolean supportTypeInheritance()
          This 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
getConnectorAnnotationTypes, getDefaultFailedResult, getDefaultProcessedResult, getEjbAndWebAnnotationTypes, getEjbAnnotationTypes, getInjectionMethodPropertyName, getInvalidAnnotatedElementHandlerResult, getOverallProcessingResult, getWebAnnotationTypes, log, validateInjectionMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunAsHandler

public RunAsHandler()
Method Detail

getAnnotationType

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

processAnnotation

protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
                                                    EjbContext[] ejbContexts)
                                             throws AnnotationProcessorException
Process Annotation with given EjbContexts.

Returns:
HandlerProcessingResult
Throws:
AnnotationProcessorException

processAnnotation

protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
                                                    WebComponentContext[] webCompContexts)
                                             throws AnnotationProcessorException
Process Annotation with given WebCompContexts.

Returns:
HandlerProcessingResult
Throws:
AnnotationProcessorException

processAnnotation

protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
                                                    WebBundleContext webBundleContext)
                                             throws AnnotationProcessorException
Process Annotation with given WebBundleContext.

Returns:
HandlerProcessingResult
Throws:
AnnotationProcessorException

getTypeDependencies

public java.lang.Class<? extends java.lang.annotation.Annotation>[] getTypeDependencies()
Specified by:
getTypeDependencies in interface AnnotationHandler
Overrides:
getTypeDependencies in class AbstractHandler
Returns:
an array of annotation types this annotation handler would require to be processed (if present) before it processes it's own annotation type.

processAnnotation

public HandlerProcessingResult processAnnotation(AnnotationInfo ainfo)
                                          throws 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.

Parameters:
ainfo - the annotation information
Throws:
AnnotationProcessorException

supportTypeInheritance

protected boolean supportTypeInheritance()
This indicates whether the annotation type should be processed for type level in super-class.



Copyright © 2012 GlassFish Community. All Rights Reserved.