org.apache.tuscany.sca.core.invocation
Class JDKInvocationHandler

java.lang.Object
  extended by org.apache.tuscany.sca.core.invocation.JDKInvocationHandler
All Implemented Interfaces:
java.io.Serializable, java.lang.reflect.InvocationHandler
Direct Known Subclasses:
JDKCallbackInvocationHandler

public class JDKInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  java.lang.Class<?> businessInterface
           
protected  org.osoa.sca.CallableReference<?> callableReference
           
protected  java.util.Map<java.lang.reflect.Method,InvocationChain> chains
           
protected  ExtendedConversation conversation
           
protected  boolean conversational
           
protected  boolean fixedWire
           
protected  MessageFactory messageFactory
           
protected  EndpointReference source
           
protected  EndpointReference target
           
protected  RuntimeWire wire
           
 
Constructor Summary
JDKInvocationHandler(MessageFactory messageFactory, org.osoa.sca.CallableReference<?> callableReference)
           
JDKInvocationHandler(MessageFactory messageFactory, java.lang.Class<?> businessInterface, RuntimeWire wire)
           
 
Method Summary
 org.osoa.sca.CallableReference<?> getCallableReference()
           
protected  java.lang.Object getCallbackID()
           
protected  java.lang.Object getCallbackObject()
           
protected  java.lang.Object getConversationID()
           
protected  InvocationChain getInvocationChain(java.lang.reflect.Method method, RuntimeWire wire)
           
protected  void init(RuntimeWire wire)
           
protected  void initConversational(RuntimeWire wire)
           
protected  java.lang.Object invoke(InvocationChain chain, java.lang.Object[] args, RuntimeWire wire, EndpointReference source)
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
protected  java.lang.Object invokeObjectMethod(java.lang.reflect.Method method, java.lang.Object[] args)
          Handle the methods on the Object.class
 void setCallableReference(org.osoa.sca.CallableReference<?> callableReference)
           
protected  void setEndpoint(EndpointReference endpoint)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conversational

protected boolean conversational

conversation

protected ExtendedConversation conversation

messageFactory

protected MessageFactory messageFactory

source

protected EndpointReference source

target

protected EndpointReference target

wire

protected RuntimeWire wire

callableReference

protected org.osoa.sca.CallableReference<?> callableReference

businessInterface

protected java.lang.Class<?> businessInterface

fixedWire

protected boolean fixedWire

chains

protected transient java.util.Map<java.lang.reflect.Method,InvocationChain> chains
Constructor Detail

JDKInvocationHandler

public JDKInvocationHandler(MessageFactory messageFactory,
                            java.lang.Class<?> businessInterface,
                            RuntimeWire wire)

JDKInvocationHandler

public JDKInvocationHandler(MessageFactory messageFactory,
                            org.osoa.sca.CallableReference<?> callableReference)
Method Detail

init

protected void init(RuntimeWire wire)

initConversational

protected void initConversational(RuntimeWire wire)

getCallbackID

protected java.lang.Object getCallbackID()

getConversationID

protected java.lang.Object getConversationID()

getCallbackObject

protected java.lang.Object getCallbackObject()

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 interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

invokeObjectMethod

protected java.lang.Object invokeObjectMethod(java.lang.reflect.Method method,
                                              java.lang.Object[] args)
                                       throws java.lang.Throwable
Handle the methods on the Object.class

Parameters:
method -
args -
Throws:
java.lang.Throwable

getInvocationChain

protected InvocationChain getInvocationChain(java.lang.reflect.Method method,
                                             RuntimeWire wire)

setEndpoint

protected void setEndpoint(EndpointReference endpoint)

invoke

protected java.lang.Object invoke(InvocationChain chain,
                                  java.lang.Object[] args,
                                  RuntimeWire wire,
                                  EndpointReference source)
                           throws java.lang.Throwable
Throws:
java.lang.Throwable

getCallableReference

public org.osoa.sca.CallableReference<?> getCallableReference()
Returns:
the callableReference

setCallableReference

public void setCallableReference(org.osoa.sca.CallableReference<?> callableReference)
Parameters:
callableReference - the callableReference to set