com.xenonsoft.bridgetown.aop.impl
Class DefaultInterceptionContext

java.lang.Object
  extended bycom.xenonsoft.bridgetown.aop.impl.DefaultInterceptionContext
All Implemented Interfaces:
IInterceptionContext, java.io.Serializable

public class DefaultInterceptionContext
extends java.lang.Object
implements IInterceptionContext, java.io.Serializable

Default interception context based on cglib.

Version:
$Id: DefaultInterceptionContext.java,v 1.3 2005/03/17 02:24:39 peter_pilgrim Exp $
Author:
peterp, 21-Sep-2004
See Also:
Serialized Form

Constructor Summary
DefaultInterceptionContext()
          Default constructor
DefaultInterceptionContext(IMethodPointCut pointCut, java.lang.Class invocationClass, java.lang.reflect.Method invocationMethod, java.lang.Object bean, java.lang.Object[] args, net.sf.cglib.proxy.MethodProxy methodProxy)
          Standard constructor
 
Method Summary
 java.lang.Object getBean()
          Gets the bean, which is the object passed to a CGLIB method interceptor
 java.lang.Class getInvocationClass()
          Returns the invocation class
 java.lang.reflect.Method getInvocationMethod()
          Returns the invocation method
 net.sf.cglib.proxy.MethodProxy getMethodProxy()
          Gets the methodProxy
 java.lang.Object[] getParameters()
          Returns the invocation parameters for the method pointcut
 IPointCut getPointCut()
          Retrieves the relevant pointcut
 java.lang.Object proceed()
          Invokes the target method
 void setBean(java.lang.Object bean)
          Sets the bean, which is the object passed to a CGLIB method interceptor
 void setInvocationClass(java.lang.Class invocationClass)
          Sets the invocation class
 void setInvocationMethod(java.lang.reflect.Method invocationMethod)
          Sets the invocation method
 void setMethodProxy(net.sf.cglib.proxy.MethodProxy methodProxy)
          Sets the methodProxy
 void setParameters(java.lang.Object[] parameters)
          Sets the parameters
 void setPointCut(IMethodPointCut pointCut)
          Sets the point cut
 java.lang.String toString()
          Prints the debuggable string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultInterceptionContext

public DefaultInterceptionContext()
Default constructor


DefaultInterceptionContext

public DefaultInterceptionContext(IMethodPointCut pointCut,
                                  java.lang.Class invocationClass,
                                  java.lang.reflect.Method invocationMethod,
                                  java.lang.Object bean,
                                  java.lang.Object[] args,
                                  net.sf.cglib.proxy.MethodProxy methodProxy)
Standard constructor

Parameters:
pointCut - the method point cut
invocationClass - the class
invocationMethod - the method
bean - the target bean
args - the invocation parameters
methodProxy - the method proxy object from CGLIB
Method Detail

getPointCut

public IPointCut getPointCut()
Retrieves the relevant pointcut

Specified by:
getPointCut in interface IInterceptionContext
Returns:
the pointcut
See Also:
IInterceptionContext.getPointCut()

getInvocationClass

public java.lang.Class getInvocationClass()
Returns the invocation class

Specified by:
getInvocationClass in interface IInterceptionContext
Returns:
the Java class
See Also:
IInterceptionContext.getInvocationClass()

getInvocationMethod

public java.lang.reflect.Method getInvocationMethod()
Returns the invocation method

Specified by:
getInvocationMethod in interface IInterceptionContext
Returns:
the Java method
See Also:
IInterceptionContext.getInvocationMethod()

getParameters

public java.lang.Object[] getParameters()
Returns the invocation parameters for the method pointcut

Specified by:
getParameters in interface IInterceptionContext
Returns:
the parameters
See Also:
IInterceptionContext.getParameters()

setInvocationClass

public void setInvocationClass(java.lang.Class invocationClass)
Sets the invocation class

Parameters:
invocationClass - The invocationClass to set.

setInvocationMethod

public void setInvocationMethod(java.lang.reflect.Method invocationMethod)
Sets the invocation method

Parameters:
invocationMethod - The invocationMethod to set.

setParameters

public void setParameters(java.lang.Object[] parameters)
Sets the parameters

Parameters:
parameters - The parameters to set.

setPointCut

public void setPointCut(IMethodPointCut pointCut)
Sets the point cut

Parameters:
pointCut - The pointCut to set.

getBean

public java.lang.Object getBean()
Gets the bean, which is the object passed to a CGLIB method interceptor

Specified by:
getBean in interface IInterceptionContext
Returns:
Returns the bean.

setBean

public void setBean(java.lang.Object bean)
Sets the bean, which is the object passed to a CGLIB method interceptor

Parameters:
bean - The bean to set.

getMethodProxy

public net.sf.cglib.proxy.MethodProxy getMethodProxy()
Gets the methodProxy

Returns:
Returns the methodProxy.

setMethodProxy

public void setMethodProxy(net.sf.cglib.proxy.MethodProxy methodProxy)
Sets the methodProxy

Parameters:
methodProxy - The methodProxy to set.

proceed

public java.lang.Object proceed()
                         throws java.lang.Throwable
Invokes the target method

Specified by:
proceed in interface IInterceptionContext
Returns:
the return value object of the target method
Throws:
java.lang.Throwable
See Also:
IInterceptionContext.proceed()

toString

public java.lang.String toString()
Prints the debuggable string

Returns:
debug string
See Also:
Object.toString()


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.