Invocation API 1.1.0.Final

org.jboss.invocation
Class InterceptorInvocationHandler

java.lang.Object
  extended by org.jboss.invocation.InterceptorInvocationHandler
All Implemented Interfaces:
Serializable, InvocationHandler

public class InterceptorInvocationHandler
extends Object
implements InvocationHandler, Serializable

A Proxy InvocationHandler which delegates invocations to an Interceptor.

Author:
David M. Lloyd
See Also:
Serialized Form

Constructor Summary
InterceptorInvocationHandler(Interceptor interceptor)
          Construct a new instance.
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
          Handle a proxy method invocation.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InterceptorInvocationHandler

public InterceptorInvocationHandler(Interceptor interceptor)
Construct a new instance.

Parameters:
interceptor - the interceptor to send invocations through
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Handle a proxy method invocation.

Specified by:
invoke in interface InvocationHandler
Parameters:
proxy - the proxy instance
method - the invoked method
args - the method arguments
Returns:
the result of the method call
Throws:
Throwable - the exception to thrown from the method invocation on the proxy instance, if any

toString

public String toString()

Overrides:
toString in class Object

Invocation API 1.1.0.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.