org.apache.commons.proxy.interceptor
Class ExecutorInterceptor

java.lang.Object
  extended by org.apache.commons.proxy.interceptor.ExecutorInterceptor
All Implemented Interfaces:
Interceptor

public class ExecutorInterceptor
extends Object
implements Interceptor

A method interceptor that uses an Executor to execute the method invocation.

Note: Only void methods can be intercepted using this class! Any attempts to intercept non-void methods will result in an IllegalArgumentException. If the proxy interfaces include non-void methods, try using a FilteredInterceptor along with a ReturnTypeFilter to wrap an instance of this class.

Dependencies:

Since:
1.0
Author:
James Carman

Constructor Summary
ExecutorInterceptor(Executor executor)
           
 
Method Summary
 Object intercept(Invocation invocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutorInterceptor

public ExecutorInterceptor(Executor executor)
Method Detail

intercept

public Object intercept(Invocation invocation)
                 throws Throwable
Specified by:
intercept in interface Interceptor
Throws:
Throwable


Copyright © 2005-2008 The Apache Software Foundation. All Rights Reserved.