|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InvocationContextContainer
Manages the association between an InvocationContext
and the calling thread. Also acts
as a factory for creating various types of InvocationContext
s.
Method Summary | |
---|---|
InvocationContext |
createInvocationContext()
If we are in a tx scope this will return an TxInvocationContext . |
NonTxInvocationContext |
createNonTxInvocationContext()
Will create an NonTxInvocationContext with the NonTxInvocationContext.isOriginLocal()
returning true. |
NonTxInvocationContext |
createRemoteInvocationContext()
Returns an NonTxInvocationContext whose NonTxInvocationContext.isOriginLocal() flag will be true. |
RemoteTxInvocationContext |
createRemoteTxInvocationContext()
Returns an RemoteTxInvocationContext . |
LocalTxInvocationContext |
createTxInvocationContext()
Returns a LocalTxInvocationContext . |
InvocationContext |
getInvocationContext()
Returns the InvocationContext that is currently associated with the calling thread. |
void |
resume(InvocationContext ic)
Associates the supplied InvocationContext with the calling thread. |
InvocationContext |
suspend()
Dissasociates thread's invocation context and returns the existing value. |
Method Detail |
---|
InvocationContext createInvocationContext()
TxInvocationContext
. Otherwise it
will return an NonTxInvocationContext
. Either way, both context will be marked
as local, i.e. InvocationContext.isOriginLocal()
will be true. The context is also associated with the
current thread, so further calls to getInvocationContext()
will return same instace.
NonTxInvocationContext createNonTxInvocationContext()
NonTxInvocationContext
with the NonTxInvocationContext.isOriginLocal()
returning true.
LocalTxInvocationContext createTxInvocationContext()
LocalTxInvocationContext
. The context is also associated with the
current thread, so further calls to getInvocationContext()
will return same instace.
RemoteTxInvocationContext createRemoteTxInvocationContext()
RemoteTxInvocationContext
. The context is also associated with the
current thread, so further calls to getInvocationContext()
will return same instace.
NonTxInvocationContext createRemoteInvocationContext()
NonTxInvocationContext
whose NonTxInvocationContext.isOriginLocal()
flag will be true. The context is also
associated with the current thread, so further calls to getInvocationContext()
will return same instace.
InvocationContext getInvocationContext()
InvocationContext
that is currently associated with the calling thread. Important:
implementations of this metrhod is most likely expensive (ThreadLocal.get), it is recommanded to cache the result
of this method rather than repeting the call.
IllegalStateException
- if there is no context associated with the current thread.InvocationContext suspend()
void resume(InvocationContext ic)
InvocationContext
with the calling thread.
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |