org.apache.ojb.broker.util.interceptor
Class Interceptor

java.lang.Object
  extended by org.apache.ojb.broker.util.interceptor.Interceptor
All Implemented Interfaces:
InvocationHandler
Direct Known Subclasses:
TracingInterceptor

public abstract class Interceptor
extends Object
implements InvocationHandler

Author:
Thomas Mahler

Constructor Summary
Interceptor()
           
 
Method Summary
protected abstract  void afterInvoke(Object proxy, Method methodToBeInvoked, Object[] args)
          this method will be invoked after methodToBeInvoked is invoked
protected abstract  void beforeInvoke(Object proxy, Method methodToBeInvoked, Object[] args)
          this method will be invoked before methodToBeInvoked is invoked
protected  Object doInvoke(Object proxy, Method methodToBeInvoked, Object[] args)
          this method will be invoked after methodToBeInvoked is invoked
 Object getRealSubject()
          Returns the realSubject.
 Object invoke(Object proxy, Method methodToBeInvoked, Object[] args)
           
 void setRealSubject(Object realSubject)
          Sets the realSubject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interceptor

public Interceptor()
Method Detail

invoke

public Object invoke(Object proxy,
                     Method methodToBeInvoked,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable
See Also:
com.develop.java.lang.reflect.InvocationHandler#invoke(Object, Method, Object[])

beforeInvoke

protected abstract void beforeInvoke(Object proxy,
                                     Method methodToBeInvoked,
                                     Object[] args)
                              throws Throwable
this method will be invoked before methodToBeInvoked is invoked

Throws:
Throwable

afterInvoke

protected abstract void afterInvoke(Object proxy,
                                    Method methodToBeInvoked,
                                    Object[] args)
                             throws Throwable
this method will be invoked after methodToBeInvoked is invoked

Throws:
Throwable

doInvoke

protected Object doInvoke(Object proxy,
                          Method methodToBeInvoked,
                          Object[] args)
                   throws Throwable
this method will be invoked after methodToBeInvoked is invoked

Throws:
Throwable

getRealSubject

public Object getRealSubject()
Returns the realSubject.

Returns:
Object

setRealSubject

public void setRealSubject(Object realSubject)
Sets the realSubject.

Parameters:
realSubject - The realSubject to set


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.