|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Invocation
An Invocation provides a tier agnostic encapsulation of a stateful, remote invocation of server-side logic. In the web tier this may take the form of an HttpServletRequest, HttpServletResponse and FilterChain. In the EJB world this will map onto the underlying container's proprietary Invocation type. etc... A Stateful Invocation is one that is associated with Server-side state - a Session. This Session is identified by a unique key, given to the client, which it will present along with each invocation that needs to be processed in the context of this state/Session. Some Invocation types may know how to relocate themselves from one Peer in a Cluster to another. In the e.g. web-tier, this might be achieved by e.g. redirection or proxying. In the e.g. EJB tier this might be implemented using similar strategies implemented on top of the EJB RMI's transport protocol. etc.
Method Summary | |
---|---|
long |
getExclusiveSessionLockWaitTime()
|
Session |
getSession()
|
java.lang.String |
getSessionKey()
Return the key carried by the Invocation associating it with server-side state - a Session |
void |
invoke()
Actually make the encapsulated Invocation. |
void |
invoke(InvocationContext context)
|
boolean |
isErrorIfSessionNotAcquired()
|
boolean |
isProxiedInvocation()
|
boolean |
isRelocatable()
Does this Invocation know how to 'relocate' itself to another EndPoint ? |
InvocationContext |
newContext(Session context)
|
void |
relocate(EndPoint endPoint)
Ask this Invocation to relocate itself to a given EndPoint |
void |
sendError(int code,
java.lang.String message)
Send an error back to the client from which the Invocation originated |
void |
setErrorIfSessionNotAcquired(boolean errorIfSessionNotAcquired)
|
void |
setInvocationProxy(InvocationProxy proxy)
|
void |
setSession(Session session)
Attach the relevant Session to this Invocation for its lifetime |
Method Detail |
---|
java.lang.String getSessionKey()
Session getSession()
void setSession(Session session)
session
- The Sessionvoid sendError(int code, java.lang.String message) throws InvocationException
code
- an error codemessage
- an error message
InvocationException
boolean isRelocatable()
void relocate(EndPoint endPoint) throws InvocationException
endPoint
- the EndPoint
InvocationException
void invoke() throws InvocationException
InvocationException
void invoke(InvocationContext context) throws InvocationException
InvocationException
boolean isProxiedInvocation()
void setInvocationProxy(InvocationProxy proxy)
void setErrorIfSessionNotAcquired(boolean errorIfSessionNotAcquired)
boolean isErrorIfSessionNotAcquired()
long getExclusiveSessionLockWaitTime()
InvocationContext newContext(Session context)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |