Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.wire
Interface TargetInvoker

All Superinterfaces:
Cloneable
All Known Implementing Classes:
TargetInvokerExtension

public interface TargetInvoker
extends Cloneable

Implementations are responsible for resolving a target and performing the actual invocation on it, for example, a component implementation instance or a service client.

Version:
$Rev: 430937 $ $Date: 2006-08-11 18:17:56 -0700 (Fri, 11 Aug 2006) $

Method Summary
 Object clone()
          Implementations must support deep cloning
 Message invoke(Message msg)
          Invokes an operation on a target with the given message
 Object invokeTarget(Object payload)
          Invokes an operation on a target with the given payload.
 boolean isCacheable()
          Determines whether the proxy can be cached on the client/source side
 boolean isOptimizable()
          Determines if the target invoker can be discarded during wire optimization
 void setCacheable(boolean cacheable)
          Sets whether the target service instance may be cached by the invoker.
 

Method Detail

invokeTarget

Object invokeTarget(Object payload)
                    throws InvocationTargetException
Invokes an operation on a target with the given payload. Used in optmized cases where messages do not need to be flowed such as in non-proxied wires.

Throws:
InvocationTargetException

invoke

Message invoke(Message msg)
               throws InvocationRuntimeException
Invokes an operation on a target with the given message

Throws:
InvocationRuntimeException

isCacheable

boolean isCacheable()
Determines whether the proxy can be cached on the client/source side


setCacheable

void setCacheable(boolean cacheable)
Sets whether the target service instance may be cached by the invoker. This is a possible optimization when a wire is configured for a "down-scope" reference, i.e. a reference from a source of a shorter lifetime to a source of greater lifetime.


isOptimizable

boolean isOptimizable()
Determines if the target invoker can be discarded during wire optimization


clone

Object clone()
             throws CloneNotSupportedException
Implementations must support deep cloning

Throws:
CloneNotSupportedException

Apache Tuscany SCA Kernel Sub-Project

-