org.skife.intercept
Class InterceptorStack

java.lang.Object
  |
  +--org.skife.intercept.InterceptorStack

public class InterceptorStack
extends java.lang.Object

Provides one way traversal across a list of interceptors. Excution of the wrapped invocation should be started via InterceptorStack.yield() to yield the thread of execution to the first interceptor.

See Also:
Interceptor

Method Summary
 java.lang.Object yield()
          Yield control to the next Interceptor in the stack, or to the base object.
 java.lang.Object yield(java.lang.Object base, java.lang.reflect.Method method, java.lang.Object[] args)
          Yield control to the next Interceptor in the stack, or to the base object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

yield

public java.lang.Object yield()
                       throws java.lang.Throwable
Yield control to the next Interceptor in the stack, or to the base object.

Returns:
The return value from the downstream command execution
Throws:
java.lang.Exception - Unhandled exception passed up the stack
java.lang.Throwable
See Also:
Interceptor.intercept(java.lang.Object, java.lang.reflect.Method, java.lang.Object[], org.skife.intercept.InterceptorStack)

yield

public java.lang.Object yield(java.lang.Object base,
                              java.lang.reflect.Method method,
                              java.lang.Object[] args)
                       throws java.lang.Throwable
Yield control to the next Interceptor in the stack, or to the base object.

This form allows overriding the complete calling environment of the downstream stack. It has no effect on the upstream interceptors.

Returns:
The return value from the downstream invocation
Throws:
java.lang.Exception - Unhandled exception passed up the stack
java.lang.Throwable
See Also:
Interceptor.intercept(java.lang.Object, java.lang.reflect.Method, java.lang.Object[], org.skife.intercept.InterceptorStack)