Tuscany Core

org.apache.tuscany.core.extension
Class ComponentTargetInvoker

java.lang.Object
  extended by org.apache.tuscany.core.extension.ComponentTargetInvoker
All Implemented Interfaces:
java.lang.Cloneable, Interceptor, TargetInvoker

public class ComponentTargetInvoker
extends java.lang.Object
implements TargetInvoker

Responsible for invoking an external service TODO: virtualy identical to ExternalServiceTargetInvoker

Version:
$Rev$ $Date$

Constructor Summary
ComponentTargetInvoker(QualifiedName serviceName, java.lang.reflect.Method method, ScopeContext container)
          Constructs a new ExternalWebServiceTargetInvoker.
 
Method Summary
 java.lang.Object clone()
          Implementations must support deep cloning
protected  java.lang.Object doInvoke(ExternalServiceInvoker invoker, java.lang.Object[] args)
           
 Message invoke(Message msg)
          Process a synchronous wire.
 java.lang.Object invokeTarget(java.lang.Object payload)
          Responsible for invoking an operation on a target with the given payload
 boolean isCacheable()
          Determines whether the proxy can be cached on the client/source side
 void setNext(Interceptor next)
          Sets the next interceptor.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentTargetInvoker

public ComponentTargetInvoker(QualifiedName serviceName,
                              java.lang.reflect.Method method,
                              ScopeContext container)
Constructs a new ExternalWebServiceTargetInvoker.

Parameters:
container -
Method Detail

invokeTarget

public java.lang.Object invokeTarget(java.lang.Object payload)
                              throws java.lang.reflect.InvocationTargetException
Description copied from interface: TargetInvoker
Responsible for invoking an operation on a target with the given payload

Specified by:
invokeTarget in interface TargetInvoker
Parameters:
payload - the parameters of the target operation or null
Throws:
java.lang.reflect.InvocationTargetException - if the target operation itself throws an exception. The root cause will be set to that exception

doInvoke

protected java.lang.Object doInvoke(ExternalServiceInvoker invoker,
                                    java.lang.Object[] args)

isCacheable

public boolean isCacheable()
Description copied from interface: TargetInvoker
Determines whether the proxy can be cached on the client/source side

Specified by:
isCacheable in interface TargetInvoker

invoke

public Message invoke(Message msg)
Description copied from interface: Interceptor
Process a synchronous wire.

Specified by:
invoke in interface Interceptor
Parameters:
msg - the request Message for the wire
Returns:
the response Message from the wire

setNext

public void setNext(Interceptor next)
Description copied from interface: Interceptor
Sets the next interceptor.

Specified by:
setNext in interface Interceptor

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from interface: TargetInvoker
Implementations must support deep cloning

Specified by:
clone in interface TargetInvoker
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

Tuscany Core

-