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

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

public abstract class Interceptor
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Author:
Thomas Mahler

Constructor Summary
Interceptor()
           
 
Method Summary
protected abstract  void afterInvoke(java.lang.Object proxy, java.lang.reflect.Method methodToBeInvoked, java.lang.Object[] args)
          this method will be invoked after methodToBeInvoked is invoked
protected abstract  void beforeInvoke(java.lang.Object proxy, java.lang.reflect.Method methodToBeInvoked, java.lang.Object[] args)
          this method will be invoked before methodToBeInvoked is invoked
protected  java.lang.Object doInvoke(java.lang.Object proxy, java.lang.reflect.Method methodToBeInvoked, java.lang.Object[] args)
          this method will be invoked after methodToBeInvoked is invoked
 java.lang.Object getRealSubject()
          Returns the realSubject.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method methodToBeInvoked, java.lang.Object[] args)
           
 void setRealSubject(java.lang.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 java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method methodToBeInvoked,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable
See Also:
com.develop.java.lang.reflect.InvocationHandler#invoke(Object, Method, Object[])

beforeInvoke

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

Throws:
java.lang.Throwable

afterInvoke

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

Throws:
java.lang.Throwable

doInvoke

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

Throws:
java.lang.Throwable

getRealSubject

public java.lang.Object getRealSubject()
Returns the realSubject.

Returns:
Object

setRealSubject

public void setRealSubject(java.lang.Object realSubject)
Sets the realSubject.

Parameters:
realSubject - The realSubject to set


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14