Fabric3 JDK Proxy Service

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.fabric3.spi.component.ConversationExpirationCallback, org.oasisopen.sca.ServiceReference<B>

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

Dispatches from a proxy to a wire.

Version:
$Rev: 7907 $ $Date: 2009-11-23 16:45:42 +0100 (Mon, 23 Nov 2009) $
See Also:
Serialized Form

Constructor Summary
JDKInvocationHandler(Class<B> interfaze, org.fabric3.spi.model.physical.InteractionType type, String callbackUri, Map<Method,org.fabric3.spi.wire.InvocationChain> mapping, org.fabric3.spi.component.ScopeContainer scopeContainer)
          Creates a wire proxy.
JDKInvocationHandler(Class<B> interfaze, String callbackUri, Map<Method,org.fabric3.spi.wire.InvocationChain> mapping)
          Creates a stateless wire proxy
 
Method Summary
 void expire(org.fabric3.spi.invocation.F3Conversation conversation)
           
 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)
                     throws NoMethodForOperationException
Creates a stateless wire proxy

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
Throws:
NoMethodForOperationException - if an error occurs creating the proxy

JDKInvocationHandler

public JDKInvocationHandler(Class<B> interfaze,
                            org.fabric3.spi.model.physical.InteractionType type,
                            String callbackUri,
                            Map<Method,org.fabric3.spi.wire.InvocationChain> mapping,
                            org.fabric3.spi.component.ScopeContainer scopeContainer)
                     throws NoMethodForOperationException
Creates a wire proxy.

Parameters:
interfaze - the proxy interface
type - the interaction style for the wire
callbackUri - the callback uri or null if the wire is unidirectional
mapping - the method to invocation chain mappings for the wire
scopeContainer - the conversational scope container
Throws:
NoMethodForOperationException - if an error occurs creating the proxy
Method Detail

expire

public void expire(org.fabric3.spi.invocation.F3Conversation conversation)
Specified by:
expire in interface org.fabric3.spi.component.ConversationExpirationCallback

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 Service

Copyright © 2007-2010 Metaform Systems.