net.kldp.beat.action
Class InterceptorStack

java.lang.Object
  extended by net.kldp.beat.action.InterceptorStack

public class InterceptorStack
extends java.lang.Object

액션에 정의된 인터셉터를 분류합니다. 이들 인터셉터들은 ActionService객체에서 요청되어 차례차례 실행됩니다.


Field Summary
private  java.util.Map<UserInterceptor,java.lang.annotation.Annotation> afterInterceptors
           
private  java.lang.reflect.Method afterMethod
           
private  java.util.Map<UserInterceptor,java.lang.annotation.Annotation> beforeInterceptors
           
private  java.lang.reflect.Method beforeMethod
           
private  Log logger
           
private  java.lang.reflect.Method resultBeforeMethod
           
private  java.util.List<Result> results
           
private  java.util.Map<SystemInterceptor,java.lang.annotation.Annotation> systemInterceptors
           
 
Constructor Summary
InterceptorStack(java.lang.Object action)
           
 
Method Summary
private  void addResult(Result result)
          Result를 추가합니다.
private  void classifyAnnotations(java.lang.annotation.Annotation annotation)
          어노테이션들을 Result또는 인터셉터로 분류합니다.
private  void classifyInterceptors(java.lang.annotation.Annotation annotation)
          인터셉터들을 분류합니다.
private  void classifyMethods(java.lang.reflect.Method[] methods)
          Action클래스안에서의 특별한 메서드들을 분류합니다.
 java.util.Map<UserInterceptor,java.lang.annotation.Annotation> getAfterInterceptors()
          액션이 정의한 사용자 후처리 인터셉터를 리턴합니다.
 java.lang.reflect.Method getAfterMethod()
          After 메서드를 리턴합니다.
 java.util.Map<UserInterceptor,java.lang.annotation.Annotation> getBeforeInterceptors()
          액션이 정의한 사용자 전처리 인터셉터를 리턴합니다.
 java.lang.reflect.Method getBeforeMethod()
          Before 메서드를 리턴합니다.
 java.lang.reflect.Method getBeforeResultMethod()
          BeforeResult 메서드를 리턴합니다.
 Result getResult(java.lang.String resultName)
           
 java.util.List<Result> getResults()
          정의된 Result를 리턴합니다.
 java.util.Map<SystemInterceptor,java.lang.annotation.Annotation> getSystemInterceptors()
          액션이 정의한 시스템 인터셉터를 리턴합니다.
 boolean hasResults()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private Log logger

results

private java.util.List<Result> results

beforeInterceptors

private java.util.Map<UserInterceptor,java.lang.annotation.Annotation> beforeInterceptors

afterInterceptors

private java.util.Map<UserInterceptor,java.lang.annotation.Annotation> afterInterceptors

systemInterceptors

private java.util.Map<SystemInterceptor,java.lang.annotation.Annotation> systemInterceptors

beforeMethod

private java.lang.reflect.Method beforeMethod

afterMethod

private java.lang.reflect.Method afterMethod

resultBeforeMethod

private java.lang.reflect.Method resultBeforeMethod
Constructor Detail

InterceptorStack

public InterceptorStack(java.lang.Object action)
                 throws ResultException
Throws:
ResultException
Method Detail

classifyMethods

private void classifyMethods(java.lang.reflect.Method[] methods)
Action클래스안에서의 특별한 메서드들을 분류합니다. 이들 메서드는 Before, BeforResult, After를 선언한 메서드입니다.

Parameters:
methods -

classifyAnnotations

private void classifyAnnotations(java.lang.annotation.Annotation annotation)
                          throws ResultException
어노테이션들을 Result또는 인터셉터로 분류합니다.

Parameters:
annotation -
Throws:
ResultException

addResult

private void addResult(Result result)
                throws ResultException
Result를 추가합니다. Result의 value는 반드시 /로 시작되어야 합니다.

Parameters:
result -
Throws:
ResultException

classifyInterceptors

private void classifyInterceptors(java.lang.annotation.Annotation annotation)
인터셉터들을 분류합니다.

Parameters:
annotation -

getResults

public java.util.List<Result> getResults()
정의된 Result를 리턴합니다.

Returns:

hasResults

public boolean hasResults()

getResult

public Result getResult(java.lang.String resultName)
                 throws ResultException
Throws:
ResultException

getSystemInterceptors

public java.util.Map<SystemInterceptor,java.lang.annotation.Annotation> getSystemInterceptors()
액션이 정의한 시스템 인터셉터를 리턴합니다.

Returns:

getBeforeInterceptors

public java.util.Map<UserInterceptor,java.lang.annotation.Annotation> getBeforeInterceptors()
액션이 정의한 사용자 전처리 인터셉터를 리턴합니다.

Returns:

getAfterInterceptors

public java.util.Map<UserInterceptor,java.lang.annotation.Annotation> getAfterInterceptors()
액션이 정의한 사용자 후처리 인터셉터를 리턴합니다.

Returns:

getBeforeMethod

public java.lang.reflect.Method getBeforeMethod()
Before 메서드를 리턴합니다.

Returns:

getAfterMethod

public java.lang.reflect.Method getAfterMethod()
After 메서드를 리턴합니다.

Returns:

getBeforeResultMethod

public java.lang.reflect.Method getBeforeResultMethod()
BeforeResult 메서드를 리턴합니다.

Returns: