org.apache.tuscany.sca.core.assembly
Class EndpointWireImpl

java.lang.Object
  extended by org.apache.tuscany.sca.core.assembly.EndpointWireImpl
All Implemented Interfaces:
java.lang.Cloneable, RuntimeWire

public class EndpointWireImpl
extends java.lang.Object
implements RuntimeWire


Constructor Summary
EndpointWireImpl(Endpoint endpoint, CompositeActivator compositeActivator)
           
 
Method Summary
 java.lang.Object clone()
           
 InvocationChain getBindingInvocationChain()
          Get the invocation chain for the binding-specific handling
 Endpoint getEndpoint()
           
 InvocationChain getInvocationChain(Operation operation)
          Lookup the invocation chain by operation
 java.util.List<InvocationChain> getInvocationChains()
          Returns the invocation chains for service operations associated with the wire
 EndpointReference getSource()
          Get the source of the wire
 EndpointReference getTarget()
          Get the target of the wire
 java.lang.Object invoke(Message msg)
          This invoke method assumes that the binding invocation chain is in force and that there will be an operation selector element there to determine which operation to call
 java.lang.Object invoke(Operation operation, Message msg)
          Invoke an operation with a context message
 java.lang.Object invoke(Operation operation, java.lang.Object[] args)
          Invoke an operation with given arguments
 void rebuild()
          Force the invocation chains to be rebuilt
 void setTarget(EndpointReference target)
          Rebind the runtime wire with the given target
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointWireImpl

public EndpointWireImpl(Endpoint endpoint,
                        CompositeActivator compositeActivator)
Parameters:
endpoint -
Method Detail

getInvocationChains

public java.util.List<InvocationChain> getInvocationChains()
Description copied from interface: RuntimeWire
Returns the invocation chains for service operations associated with the wire

Specified by:
getInvocationChains in interface RuntimeWire
Returns:
the invocation chains for service operations associated with the wire

getInvocationChain

public InvocationChain getInvocationChain(Operation operation)
Description copied from interface: RuntimeWire
Lookup the invocation chain by operation

Specified by:
getInvocationChain in interface RuntimeWire
Parameters:
operation - The operation
Returns:
The invocation chain for the given operation

invoke

public java.lang.Object invoke(Message msg)
                        throws java.lang.reflect.InvocationTargetException
Description copied from interface: RuntimeWire
This invoke method assumes that the binding invocation chain is in force and that there will be an operation selector element there to determine which operation to call

Specified by:
invoke in interface RuntimeWire
Parameters:
msg - The message
Returns:
The result
Throws:
java.lang.reflect.InvocationTargetException

invoke

public java.lang.Object invoke(Operation operation,
                               java.lang.Object[] args)
                        throws java.lang.reflect.InvocationTargetException
Description copied from interface: RuntimeWire
Invoke an operation with given arguments

Specified by:
invoke in interface RuntimeWire
Parameters:
operation - The operation
args - The arguments
Returns:
The result
Throws:
java.lang.reflect.InvocationTargetException

invoke

public java.lang.Object invoke(Operation operation,
                               Message msg)
                        throws java.lang.reflect.InvocationTargetException
Description copied from interface: RuntimeWire
Invoke an operation with a context message

Specified by:
invoke in interface RuntimeWire
Parameters:
operation - The operation
msg - The message
Returns:
The result
Throws:
java.lang.reflect.InvocationTargetException

getSource

public EndpointReference getSource()
Description copied from interface: RuntimeWire
Get the source of the wire

Specified by:
getSource in interface RuntimeWire
Returns:
The end point reference of the source

getTarget

public EndpointReference getTarget()
Description copied from interface: RuntimeWire
Get the target of the wire

Specified by:
getTarget in interface RuntimeWire
Returns:
The end point reference of the target

setTarget

public void setTarget(EndpointReference target)
Description copied from interface: RuntimeWire
Rebind the runtime wire with the given target

Specified by:
setTarget in interface RuntimeWire
Parameters:
target - The target endpoint reference

rebuild

public void rebuild()
Description copied from interface: RuntimeWire
Force the invocation chains to be rebuilt

Specified by:
rebuild in interface RuntimeWire

getBindingInvocationChain

public InvocationChain getBindingInvocationChain()
Description copied from interface: RuntimeWire
Get the invocation chain for the binding-specific handling

Specified by:
getBindingInvocationChain in interface RuntimeWire
Returns:

getEndpoint

public Endpoint getEndpoint()

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Specified by:
clone in interface RuntimeWire
Overrides:
clone in class java.lang.Object
Returns:
a clone of the runtime wire
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()