org.apache.commons.proxy.interceptor
Class ExecutorInterceptor
java.lang.Object
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:
- Concurrent API version 1.3.4 or greater
- Since:
- 1.0
- Author:
- James Carman
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExecutorInterceptor
public ExecutorInterceptor(Executor executor)
intercept
public Object intercept(Invocation invocation)
throws Throwable
- Specified by:
intercept
in interface Interceptor
- Throws:
Throwable
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.