com.google.code.rees.scope.struts2
Class StrutsSessionAdapter

java.lang.Object
  extended by com.google.code.rees.scope.session.SessionAdapter
      extended by com.google.code.rees.scope.struts2.StrutsSessionAdapter
All Implemented Interfaces:
Serializable

public class StrutsSessionAdapter
extends SessionAdapter

The Struts2 implementation of the SessionAdapter.

Author:
rees.byars
See Also:
Serialized Form

Field Summary
protected  com.opensymphony.xwork2.ActionContext actionContext
           
protected  com.opensymphony.xwork2.ActionInvocation invocation
           
protected  Map<String,Object> sessionContext
           
 
Fields inherited from class com.google.code.rees.scope.session.SessionAdapter
sessionAdapter
 
Constructor Summary
StrutsSessionAdapter(com.opensymphony.xwork2.ActionInvocation invocation)
           
 
Method Summary
 void addPostProcessor(SessionPostProcessor sessionPostProcessor)
          Add a SessionPostProcessor that is guaranteed to be executed after action execution.
 Object getAction()
          The controller instance, such as a Struts2 action class or a Spring MVC controller
 String getActionId()
          A string identifying the current action.
 Map<String,Object> getSessionContext()
          Returns a session-scoped map.
 
Methods inherited from class com.google.code.rees.scope.session.SessionAdapter
getAdapter, setAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

invocation

protected com.opensymphony.xwork2.ActionInvocation invocation

actionContext

protected com.opensymphony.xwork2.ActionContext actionContext

sessionContext

protected Map<String,Object> sessionContext
Constructor Detail

StrutsSessionAdapter

public StrutsSessionAdapter(com.opensymphony.xwork2.ActionInvocation invocation)
Method Detail

getAction

public Object getAction()
The controller instance, such as a Struts2 action class or a Spring MVC controller

Specified by:
getAction in class SessionAdapter
Returns:

getActionId

public String getActionId()
A string identifying the current action. The convention employed by the DefaultSessionConfigurationProvider is the name of the controller method being executed.

Specified by:
getActionId in class SessionAdapter
Returns:

getSessionContext

public Map<String,Object> getSessionContext()
Returns a session-scoped map. For Struts2, the returned map is the Struts2 SessionMap.

Specified by:
getSessionContext in class SessionAdapter
Returns:

addPostProcessor

public void addPostProcessor(SessionPostProcessor sessionPostProcessor)
Add a SessionPostProcessor that is guaranteed to be executed after action execution. Calling SessionPostProcessor.postProcessSession(SessionAdapter) is the responsibility of the concrete SessionAdapter extending class.

Specified by:
addPostProcessor in class SessionAdapter


Copyright © 2012-2013. All Rights Reserved.