org.slim3.container
Class Interceptor

java.lang.Object
  extended by org.slim3.container.Interceptor

public class Interceptor
extends Object

This class intercepts a method.

Author:
higa

Field Summary
protected  Method method
          The around invoke method.
protected  Object target
          The target.
 
Constructor Summary
Interceptor(Object target, Method method)
          Constructor.
 
Method Summary
 Method getMethod()
          Returns the around invoke method.
 Object getTarget()
          Returns the target.
 Object invoke(InvocationContext invocationContext)
          Invokes the method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected Object target
The target.


method

protected Method method
The around invoke method.

Constructor Detail

Interceptor

public Interceptor(Object target,
                   Method method)
Constructor.

Parameters:
target - the target
method - the around invoke method
Method Detail

getTarget

public Object getTarget()
Returns the target.

Returns:
the target

getMethod

public Method getMethod()
Returns the around invoke method.

Returns:
the around invoke method

invoke

public Object invoke(InvocationContext invocationContext)
              throws Exception
Invokes the method.

Parameters:
invocationContext - the invocation context
Returns:
a result
Throws:
Exception - if an exception is encountered


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