|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmarquee.xmlrpc.processors.SessionInvocationProcessor
The SessionProcessor allows invocation handlers to store client state in session objects between invocations. A session objects is associated with the caller IP address, hence if a client makes several simultaneous calls, each handler thread will acquire the same session objects when calling the getSession() method.
Note that the getSession() method is static, so in this form sessions span the whole JVM regardless of how many XmlRpcServers are instantiated. Should not be a problem though.
Constructor Summary | |
SessionInvocationProcessor()
|
Method Summary | |
static java.util.Map |
getSession()
Returns the session associated with the calling thread. |
void |
onException(int callId,
java.lang.String callerIp,
java.lang.String handler,
java.lang.String method,
java.util.List arguments,
java.lang.Throwable exception)
Does nothing. |
java.lang.Object |
postProcess(int callId,
java.lang.String callerIp,
java.lang.String handler,
java.lang.String method,
java.util.List arguments,
java.lang.Object returnValue)
Does nothing. |
boolean |
preProcess(int callId,
java.lang.String callerIp,
java.lang.String handler,
java.lang.String method,
java.util.List arguments)
Associates the calling thread (the thread handling the invocation) with the IP address of the client. |
static void |
setSessionTimeout(int timeout_)
Sets the timout value for sessions, expressed in minutes. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SessionInvocationProcessor()
Method Detail |
public static java.util.Map getSession()
public static void setSessionTimeout(int timeout_)
public boolean preProcess(int callId, java.lang.String callerIp, java.lang.String handler, java.lang.String method, java.util.List arguments)
preProcess
in interface XmlRpcInvocationProcessor
callId
- A sequence number for tracing calls between preProcess() and
postProcess() calls. This is unique within each session. That is,
the sequence is restarted when the application restarts.handler
- The name of the handler being called.method
- The name of the method being called.arguments
- The arguments that will be sent to the method.
XmlRpcInvocationProcessor
public java.lang.Object postProcess(int callId, java.lang.String callerIp, java.lang.String handler, java.lang.String method, java.util.List arguments, java.lang.Object returnValue)
postProcess
in interface XmlRpcInvocationProcessor
callId
- A sequence number for tracing calls between preProcess() and
postProcess() calls. This is unique within each session. That is,
the sequence is restarted when the application restarts.handler
- The name of the handler being called.method
- The name of the method that just has returned.returnValue
- The objects returned by the method. If the method
returned a primitive, it is wrapped in its object counterpart.
public void onException(int callId, java.lang.String callerIp, java.lang.String handler, java.lang.String method, java.util.List arguments, java.lang.Throwable exception)
onException
in interface XmlRpcInvocationProcessor
callId
- A sequence number for tracing calls between preProcess() and
postProcess() calls. This is unique within each session. That is,
the sequence is restarted when the application restarts.handler
- The name of the handler being called.method
- The name of the method that just has returned by throwing an
exception.exception
- The exception thrown by the method.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |