|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.axis.handlers.BasicHandler (src)
org.jboss.axis.handlers.SimpleSessionHandler
This handler uses SOAP headers to do simple session management.
Essentially, you install it on both the request and response chains of your service, on both the client and the server side.
ON THE SERVER:
ON THE CLIENT:
SimpleSessions are "reaped" periodically via a very simplistic mechanism. Each time the handler is invoke()d we check to see if more than reapPeriodicity milliseconds have elapsed since the last reap. If so, we walk the collection of active Sessions, and for each one, if it hasn't been "touched" (i.e. had a getProperty() or setProperty() performed) in longer than its timeout, we remove it from the collection.
Field Summary | |
static java.lang.String |
SESSION_ID
|
static java.lang.String |
SESSION_LOCALPART
|
static java.lang.String |
SESSION_NS
|
static QName (src) |
sessionHeaderName
|
Fields inherited from class org.jboss.axis.handlers.BasicHandler (src) |
makeLockable, name, options |
Constructor Summary | |
SimpleSessionHandler()
|
Method Summary | |
void |
doClient(MessageContext (src) context)
Client side of processing. |
void |
doServer(MessageContext (src) context)
Server side of processing. |
void |
invoke(MessageContext (src) context)
Process a MessageContext. |
void |
setDefaultSessionTimeout(int defaultSessionTimeout)
Set the default session timeout in SECONDS Again, for testing. |
void |
setReapPeriodicity(long reapTime)
Set the reaper periodicity in SECONDS Convenience method for testing. |
Methods inherited from class org.jboss.axis.handlers.BasicHandler (src) |
canHandleBlock, cleanup, generateWSDL, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SESSION_ID
public static final java.lang.String SESSION_NS
public static final java.lang.String SESSION_LOCALPART
public static final QName (src) sessionHeaderName
Constructor Detail |
public SimpleSessionHandler()
Method Detail |
public void invoke(MessageContext (src) context) throws AxisFault (src)
invoke
in interface Handler (src)
invoke
in class BasicHandler (src)
AxisFault (src)
public void doClient(MessageContext (src) context) throws AxisFault (src)
AxisFault (src)
public void doServer(MessageContext (src) context) throws AxisFault (src)
AxisFault (src)
public void setReapPeriodicity(long reapTime)
public void setDefaultSessionTimeout(int defaultSessionTimeout)
|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |