Package org.glassfish.pfl.basic.proxy
Class CompositeInvocationHandlerImpl
- java.lang.Object
-
- org.glassfish.pfl.basic.proxy.CompositeInvocationHandlerImpl
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.reflect.InvocationHandler,CompositeInvocationHandler
public class CompositeInvocationHandlerImpl extends java.lang.Object implements CompositeInvocationHandler
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.Class<?>,java.lang.reflect.InvocationHandler>classToInvocationHandlerprivate java.lang.reflect.InvocationHandlerdefaultHandlerprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description CompositeInvocationHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInvocationHandler(java.lang.Class<?> interf, java.lang.reflect.InvocationHandler handler)Add an invocation handler for all methods on interface interf.java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)voidsetDefaultHandler(java.lang.reflect.InvocationHandler handler)Set the default invocation handler to use if none of the invocation handlers added by calls to addInvocationHandler apply.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
classToInvocationHandler
private java.util.Map<java.lang.Class<?>,java.lang.reflect.InvocationHandler> classToInvocationHandler
-
defaultHandler
private java.lang.reflect.InvocationHandler defaultHandler
-
-
Method Detail
-
addInvocationHandler
public void addInvocationHandler(java.lang.Class<?> interf, java.lang.reflect.InvocationHandler handler)Description copied from interface:CompositeInvocationHandlerAdd an invocation handler for all methods on interface interf.- Specified by:
addInvocationHandlerin interfaceCompositeInvocationHandler
-
setDefaultHandler
public void setDefaultHandler(java.lang.reflect.InvocationHandler handler)
Description copied from interface:CompositeInvocationHandlerSet the default invocation handler to use if none of the invocation handlers added by calls to addInvocationHandler apply.- Specified by:
setDefaultHandlerin interfaceCompositeInvocationHandler
-
invoke
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable- Specified by:
invokein interfacejava.lang.reflect.InvocationHandler- Throws:
java.lang.Throwable
-
-