org.apache.tuscany.sca.invocation
Interface InvocationChain

All Known Implementing Classes:
InvocationChainImpl

public interface InvocationChain

A wire consists of 1..n invocation chains associated with the operations of its source service contract.

Invocation chains may contain Interceptors that process invocations.

A Message is used to pass data associated with an invocation through the chain.


Method Summary
 void addInterceptor(Interceptor interceptor)
          Adds an interceptor to the chain.
 void addInterceptor(int index, Interceptor interceptor)
          Deprecated. Please use void addInterceptor(String phase, Interceptor interceptor); Adds an interceptor at the given position in the interceptor stack
 void addInterceptor(java.lang.String phase, Interceptor interceptor)
          Add an interceptor to the given phase
 void addInvoker(Invoker invoker)
          Adds an invoker to the chain
 boolean allowsPassByReference()
          Indicate if the data can be passed in by reference as they won't be mutated.
 Invoker getHeadInvoker()
          Returns the first invoker in the chain.
 Operation getSourceOperation()
          Returns the source operation for this invocation chain.
 Invoker getTailInvoker()
          Deprecated. This method is not used Returns the last invoker in the chain.
 Operation getTargetOperation()
          Returns the target operation for this invocation chain.
 void setAllowsPassByReference(boolean allowsPBR)
          Force the invocation to allow pass-by-reference
 void setTargetOperation(Operation operation)
          Updates the target operation for this invocation chain.
 

Method Detail

getTargetOperation

Operation getTargetOperation()
Returns the target operation for this invocation chain.

Returns:
The target operation for this invocation chain

setTargetOperation

void setTargetOperation(Operation operation)
Updates the target operation for this invocation chain.

Parameters:
operation - The new target operation for this invocation chain

getSourceOperation

Operation getSourceOperation()
Returns the source operation for this invocation chain.

Returns:
The source operation for this invocation chain

addInterceptor

void addInterceptor(Interceptor interceptor)
Adds an interceptor to the chain. For reference side, it will be added to Phase.REFERENCE. For service side, it will be added to Phase.SERVICE

Parameters:
interceptor - The interceptor to add

addInvoker

void addInvoker(Invoker invoker)
Adds an invoker to the chain

Parameters:
invoker - The invoker to add

getHeadInvoker

Invoker getHeadInvoker()
Returns the first invoker in the chain.

Returns:
The first invoker in the chain

getTailInvoker

@Deprecated
Invoker getTailInvoker()
Deprecated. This method is not used Returns the last invoker in the chain.

Returns:
The last invoker in the chain

addInterceptor

@Deprecated
void addInterceptor(int index,
                               Interceptor interceptor)
Deprecated. Please use void addInterceptor(String phase, Interceptor interceptor); Adds an interceptor at the given position in the interceptor stack

Parameters:
index - The position in the interceptor stack to add the interceptor
interceptor - The interceptor to add

addInterceptor

void addInterceptor(java.lang.String phase,
                    Interceptor interceptor)
Add an interceptor to the given phase

Parameters:
phase -
interceptor -

allowsPassByReference

boolean allowsPassByReference()
Indicate if the data can be passed in by reference as they won't be mutated.

Returns:
true if pass-by-reference is allowed

setAllowsPassByReference

void setAllowsPassByReference(boolean allowsPBR)
Force the invocation to allow pass-by-reference

Parameters:
allowsPBR -