| java.lang.Object com.opensymphony.xwork.interceptor.AroundInterceptor com.opensymphony.webwork.interceptor.SessionInvalidationInterceptor
SessionInvalidationInterceptor | public class SessionInvalidationInterceptor extends AroundInterceptor (Code) | |
This interceptor invalidates http session based on the type of operation it is in.
There's three type of operations:-
- NextRequest - This causes the interceptor to invalidate the session in
the next comming request where this interceptor is present in the
interceptor stack. This interceptor mark this in the http session
using a key determined by the key attribute of this interceptor
- Now - This causes this interceptor to invalidate the session at the end of
this interceptor's interception
- NoOperation - This causes this interceptor to basically do nothing.
It is here such that users could have this interceptor in their
default stack and still allows it to do nothing
No intended extension points.
- type - indicate the operation of this interceptor, valid values are 'NextRequest', 'Now' and 'NoOperation'
See description above for more information.
- key - this is the http session key used by the interceptor to mark the situation
whereby the next comming request with this interceptor present in the
interception stack, it will invalidate the http session.
<action name="logout" ... >
<intereptor-ref name="sessionInvalidate">
<param name="type">Now</param>
</interceptor-ref>
....
</action>
or
<action name="sayByeByeNextRequestWillHaveSessionLost" ... >
<interceptor-ref name="sessionInvalidate">
<param name="type"<NextRequest</param>
</interceptor-ref>
....
</action>
<!-- This is the next request, "sessionInvalidate" will find the marker inserted
by the action above and invalidate the session -->
<!-- The type="NoOperation" is just there so that the type is a valid one, and
we don't get a warning log meessage -->
<action name="nextRequest" ... >
<interceptor-ref name="sessionInvalidate">
<param name="type">NoOperation</param>
</interceptor-ref>
...
</action>
author: tmjee version: $Date: 2006-12-11 13:45:46 +0100 (Mon, 11 Dec 2006) $ $Id: SessionInvalidationInterceptor.java 2757 2006-12-11 12:45:46Z tmjee $ |
Method Summary | |
protected void | after(ActionInvocation invocation, String result) Decides if this interceptor should invalidate the session or mark the session
to be invalidated upon the next request that contains this interceptor in the stack. | protected void | before(ActionInvocation invocation) Invalidate this session if it is marked to be invalidated from previous request. | public String | getKey() Get the session key, of which this interceptor will use to mark if the next request
with this interceptor in the stack should have the session invalidated. | public String | getType() Returns the operation type. | public void | setKey(String key) Set the session key, of which this interceptor will use to mark if the next request
with this interceptor in the stack should have the session invalidated. | public void | setType(String type) Set the operation type, either 'NextRequest', 'Now', or 'NoOperation' (default). |
getKey | public String getKey()(Code) | | Get the session key, of which this interceptor will use to mark if the next request
with this interceptor in the stack should have the session invalidated.
String |
getType | public String getType()(Code) | | Returns the operation type.
String |
setKey | public void setKey(String key)(Code) | | Set the session key, of which this interceptor will use to mark if the next request
with this interceptor in the stack should have the session invalidated.
Parameters: key - |
setType | public void setType(String type)(Code) | | Set the operation type, either 'NextRequest', 'Now', or 'NoOperation' (default).
Parameters: key - |
Fields inherited from com.opensymphony.xwork.interceptor.AroundInterceptor | protected transient Log log(Code)(Java Doc)
|
|
|