org.outerj.xreporter.report.instance
Class CheckLockedInvocationHandler

java.lang.Object
  extended byorg.outerj.xreporter.util.AbstractInvocationHandler
      extended byorg.outerj.xreporter.report.instance.CheckLockedInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class CheckLockedInvocationHandler
extends AbstractInvocationHandler

This is an invocation handler that will sit between the user of the Report interface and the actual ReportImpl. It will check wether the report has not yet been released, so that it is impossible to call methods on a report after it has been released.


Field Summary
protected  Report instance
           
protected  boolean isLocked
           
protected  java.lang.reflect.Method releaseMethod
           
 
Fields inherited from class org.outerj.xreporter.util.AbstractInvocationHandler
equalsMethod, hashCodeMethod, toStringMethod
 
Constructor Summary
CheckLockedInvocationHandler()
           
 
Method Summary
 java.lang.Object doInvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 
Methods inherited from class org.outerj.xreporter.util.AbstractInvocationHandler
invoke, proxyEquals, proxyHashCode, proxyToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

releaseMethod

protected java.lang.reflect.Method releaseMethod

instance

protected Report instance

isLocked

protected boolean isLocked
Constructor Detail

CheckLockedInvocationHandler

public CheckLockedInvocationHandler()
Method Detail

doInvoke

public java.lang.Object doInvoke(java.lang.Object proxy,
                                 java.lang.reflect.Method method,
                                 java.lang.Object[] args)
                          throws java.lang.Throwable
Specified by:
doInvoke in class AbstractInvocationHandler
Throws:
java.lang.Throwable