org.slim3.container
Class InvocationContextImpl

java.lang.Object
  extended by org.slim3.container.InvocationContextImpl
All Implemented Interfaces:
InvocationContext

public class InvocationContextImpl
extends Object
implements InvocationContext

An implementation class for InvocationContext.

Author:
higa

Field Summary
protected  ConcurrentHashMap<String,Object> contextData
          The context data.
protected  int interceptorIndex
          The index for interceptor.
protected  Interceptor[] interceptors
          The interceptors.
protected  Method method
          The overridden method declared in the super class or interface.
protected  Object[] parameters
          The parameters.
protected  Method proceedMethod
          The forwarder method for invoking the overridden method.
protected  Object target
          The target.
 
Constructor Summary
InvocationContextImpl(Interceptor[] interceptors, Object target, Method method, Method proceedMethod, Object[] parameters)
          Constructor.
 
Method Summary
 Map<String,Object> getContextData()
           
 Interceptor[] getInterceptors()
          Returns the interceptors.
 Method getMethod()
          Returns the overridden method declared in the super class or interface.
 Object[] getParameters()
           
 Method getProceedMethod()
          Returns the forwarder method for invoking the overridden method.
 Object getTarget()
          Returns the target.
 Object proceed()
           
 void setParameters(Object[] parameters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interceptors

protected Interceptor[] interceptors
The interceptors.


target

protected Object target
The target.


method

protected Method method
The overridden method declared in the super class or interface.


proceedMethod

protected Method proceedMethod
The forwarder method for invoking the overridden method.


parameters

protected Object[] parameters
The parameters.


interceptorIndex

protected int interceptorIndex
The index for interceptor.


contextData

protected ConcurrentHashMap<String,Object> contextData
The context data.

Constructor Detail

InvocationContextImpl

public InvocationContextImpl(Interceptor[] interceptors,
                             Object target,
                             Method method,
                             Method proceedMethod,
                             Object[] parameters)
                      throws NullPointerException
Constructor.

Parameters:
interceptors - the interceptors
target - the target
method - the overridden method declared in the super class or interface
proceedMethod - the forwarder method for invoking the overridden method
parameters - the parameters
Throws:
NullPointerException - if the interceptors parameter is null or if the target parameter is null or if the method parameter is null or if the parameters parameter is null
Method Detail

getInterceptors

public Interceptor[] getInterceptors()
Returns the interceptors.

Returns:
the interceptors

getTarget

public Object getTarget()
Returns the target.

Specified by:
getTarget in interface InvocationContext
Returns:
the target

getMethod

public Method getMethod()
Returns the overridden method declared in the super class or interface.

Specified by:
getMethod in interface InvocationContext
Returns:
the overridden method

getProceedMethod

public Method getProceedMethod()
Returns the forwarder method for invoking the overridden method.

Returns:
the forwarder method

getParameters

public Object[] getParameters()
Specified by:
getParameters in interface InvocationContext

setParameters

public void setParameters(Object[] parameters)
Specified by:
setParameters in interface InvocationContext

getContextData

public Map<String,Object> getContextData()
Specified by:
getContextData in interface InvocationContext

proceed

public Object proceed()
               throws Exception
Specified by:
proceed in interface InvocationContext
Throws:
Exception


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.