|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InvocationChain
An inbound or outbound invocation pipeline for a service operation. Wires consist of 1..n invocation chains associated with the operations of the service contract the wire represents. Invocation chains are associated with the outbound or inbound side of a wire are bridged or "connected" when an assembly is processed. Outbound chains are only connected to inbound chains and vice versa.
Invocation chains contain at least oneInterceptor
that process invocations in an around-style manner. In
some scenarios, a service proxy may only contain inbound invocation chains, for example, when a service is resolved
through a locate operation by a non-component client. In this case, there will be no outbound invocation chains and
the target invoker will be held by the target-side and passed down the pipeline.
A Message
is used to pass data associated with an invocation through the chain. Message
s contain
a TargetInvoker
responsible for dispatching to a target instance and may be cached on the source-side.
Caching allows various optimizations such as avoiding target instance resolution when the client-side lifecycle scope
is a shorter duration than the target.
Method Summary | |
---|---|
void |
addInterceptor(Interceptor interceptor)
Adds an interceptor to the chain |
void |
addInterceptor(int index,
Interceptor interceptor)
Adds an interceptor at the given position in the interceptor stack |
Interceptor |
getHeadInterceptor()
Returns the first interceptor in the chain |
Operation |
getOperation()
Returns the target operation for this invocation chain |
Interceptor |
getTailInterceptor()
Returns the last interceptor in the chain |
Interceptor |
getTargetInterceptor()
Returns the head interceptor of the birdged target-side chain |
TargetInvoker |
getTargetInvoker()
Returns the target invoker that is passed down the chain |
void |
prepare()
Signals to the chain that its configuration is complete. |
void |
setTargetInterceptor(Interceptor interceptor)
Sets the head interceptor of the bridged target-side chain |
void |
setTargetInvoker(TargetInvoker invoker)
Sets the target invoker to pass down the chain |
Method Detail |
---|
Operation getOperation()
void setTargetInvoker(TargetInvoker invoker)
TargetInvoker getTargetInvoker()
void addInterceptor(Interceptor interceptor)
void addInterceptor(int index, Interceptor interceptor)
index
- the position in the interceptor stack to add the interceptorinterceptor
- the interceptor to addInterceptor getHeadInterceptor()
Interceptor getTailInterceptor()
void setTargetInterceptor(Interceptor interceptor)
Interceptor getTargetInterceptor()
void prepare()
|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |