org.skife.intercept.interceptors
Class InefficientLoggingInterceptor

java.lang.Object
  |
  +--org.skife.intercept.interceptors.InefficientLoggingInterceptor
All Implemented Interfaces:
Interceptor

public class InefficientLoggingInterceptor
extends java.lang.Object
implements Interceptor

Logging interceptor that simply prints messages to a PrintStream such as System.out


Constructor Summary
InefficientLoggingInterceptor()
          Send logging output to System.out
InefficientLoggingInterceptor(java.io.PrintStream out)
           
 
Method Summary
 java.lang.Object intercept(java.lang.Object base, java.lang.reflect.Method method, java.lang.Object[] args, org.skife.intercept.InterceptorStack stack)
          Prints to out before and after invoking the stack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InefficientLoggingInterceptor

public InefficientLoggingInterceptor()
Send logging output to System.out


InefficientLoggingInterceptor

public InefficientLoggingInterceptor(java.io.PrintStream out)
Parameters:
out - PrintStream to log to
Method Detail

intercept

public java.lang.Object intercept(java.lang.Object base,
                                  java.lang.reflect.Method method,
                                  java.lang.Object[] args,
                                  org.skife.intercept.InterceptorStack stack)
                           throws java.lang.Throwable
Prints to out before and after invoking the stack

Specified by:
intercept in interface Interceptor
Parameters:
base - A reference to the base object being intercepted
method - A reference to the Method being intercepted
args - The invocation arguments
stack - The InterceptorStack
Returns:
a value to be returned by the method invocation
java.lang.Throwable