Top Fields Constructors Methods
org.glassfish.pfl.basic.proxy

public Class CompositeInvocationHandlerImpl

extends Object
implements CompositeInvocationHandler
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.basic.proxy.CompositeInvocationHandler, java.io.Serializable, java.lang.reflect.InvocationHandler
Imports
java.lang.reflect.InvocationHandler, .Method, java.util.LinkedHashMap, .Map, org.glassfish.pfl.basic.algorithm.ClassAnalyzer, org.glassfish.pfl.basic.func.UnaryPredicateBase

Field Summary

Modifier and TypeField and Description
private Map<Class<?>, InvocationHandler>
private InvocationHandler
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addInvocationHandler(final Class<?> interf, final InvocationHandler handler)

Implements org.glassfish.pfl.basic.proxy.CompositeInvocationHandler.addInvocationHandler.

Add an invocation handler for all methods on interface interf.

public Object
invoke(Object proxy, Method method, Object[] args)

Implements java.lang.reflect.InvocationHandler.invoke.

Processes a method invocation on a proxy instance and returns the result.

public void
setDefaultHandler(InvocationHandler handler)

Implements org.glassfish.pfl.basic.proxy.CompositeInvocationHandler.setDefaultHandler.

Set the default invocation handler to use if none of the invocation handlers added by calls to addInvocationHandler apply.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classToInvocationHandlerback to summary
private Map<Class<?>, InvocationHandler> classToInvocationHandler
defaultHandlerback to summary
private InvocationHandler defaultHandler
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

CompositeInvocationHandlerImplback to summary
public CompositeInvocationHandlerImpl()

Method Detail

addInvocationHandlerback to summary
public void addInvocationHandler(final Class<?> interf, final InvocationHandler handler)

Implements org.glassfish.pfl.basic.proxy.CompositeInvocationHandler.addInvocationHandler.

Doc from org.glassfish.pfl.basic.proxy.CompositeInvocationHandler.addInvocationHandler.

Add an invocation handler for all methods on interface interf.

Annotations
@Override
invokeback to summary
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable

Implements java.lang.reflect.InvocationHandler.invoke.

Doc from java.lang.reflect.InvocationHandler.invoke.

Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.

Annotations
@Override
Exceptions
Throwable:
the exception to throw from the method invocation on the proxy instance. The exception's type must be assignable either to any of the exception types declared in the throws clause of the invoked method or to the unchecked exception types java.lang.RuntimeException or java.lang.Error. If a checked exception is thrown by this method that is not assignable to any of the exception types declared in the throws clause of the invoked method, then an UndeclaredThrowableException containing the exception that was thrown by this method will be thrown by the method invocation on the proxy instance.
setDefaultHandlerback to summary
public void setDefaultHandler(InvocationHandler handler)

Implements org.glassfish.pfl.basic.proxy.CompositeInvocationHandler.setDefaultHandler.

Doc from org.glassfish.pfl.basic.proxy.CompositeInvocationHandler.setDefaultHandler.

Set the default invocation handler to use if none of the invocation handlers added by calls to addInvocationHandler apply.

Annotations
@Override