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>
classToInvocationHandler
private java.lang.reflect.InvocationHandler
defaultHandler
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description CompositeInvocationHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInvocationHandler(java.lang.Class<?> interf, java.lang.reflect.InvocationHandler handler)
Add an invocation handler for all methods on interface interf.java.lang.Object
invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
void
setDefaultHandler(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:CompositeInvocationHandler
Add an invocation handler for all methods on interface interf.- Specified by:
addInvocationHandler
in interfaceCompositeInvocationHandler
-
setDefaultHandler
public void setDefaultHandler(java.lang.reflect.InvocationHandler handler)
Description copied from interface:CompositeInvocationHandler
Set the default invocation handler to use if none of the invocation handlers added by calls to addInvocationHandler apply.- Specified by:
setDefaultHandler
in 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:
invoke
in interfacejava.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable
-
-