Fabric3 JDK Proxy Extension

org.fabric3.implementation.proxy.jdk
Class JDKInvocationHandler<B>

java.lang.Object
  extended by org.fabric3.implementation.proxy.jdk.JDKInvocationHandler<B>
All Implemented Interfaces:
Serializable, InvocationHandler, org.oasisopen.sca.ServiceReference<B>

public final class JDKInvocationHandler<B>
extends Object
implements InvocationHandler, org.oasisopen.sca.ServiceReference<B>

Dispatches from a proxy to a wire.

Version:
$Rev: 11083 $ $Date: 2012-06-21 10:38:50 +0000 (Thu, 21 Jun 2012) $
See Also:
Serialized Form

Constructor Summary
JDKInvocationHandler(Class<B> interfaze, String callbackUri, Map<Method,org.fabric3.spi.wire.InvocationChain> mapping)
          Constructor.
 
Method Summary
 Class<B> getBusinessInterface()
           
 B getService()
           
 org.oasisopen.sca.ServiceReference<B> getServiceReference()
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDKInvocationHandler

public JDKInvocationHandler(Class<B> interfaze,
                            String callbackUri,
                            Map<Method,org.fabric3.spi.wire.InvocationChain> mapping)
Constructor.

Parameters:
interfaze - the proxy interface
callbackUri - the callback uri or null if the wire is unidirectional
mapping - the method to invocation chain mappings for the wire
Method Detail

getService

public B getService()
Specified by:
getService in interface org.oasisopen.sca.ServiceReference<B>

getBusinessInterface

public Class<B> getBusinessInterface()
Specified by:
getBusinessInterface in interface org.oasisopen.sca.ServiceReference<B>

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

getServiceReference

public org.oasisopen.sca.ServiceReference<B> getServiceReference()

Fabric3 JDK Proxy Extension

Copyright © 2007-2012 Metaform Systems.