|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.code.rees.scope.session.SessionAdapter
public abstract class SessionAdapter
A simple abstract adapter used to adapt frameworks
to the session management components. Makes use of ThreadLocal to
make the current request's adapter available through the static call
SessionAdapter.getAdapter().
| Field Summary | |
|---|---|
protected static ThreadLocal<SessionAdapter> |
sessionAdapter
|
| Constructor Summary | |
|---|---|
SessionAdapter()
|
|
| Method Summary | |
|---|---|
abstract void |
addPostProcessor(SessionPostProcessor sessionPostProcessor)
Add a SessionPostProcessor that is guaranteed to be
executed after action execution. |
abstract Object |
getAction()
The controller instance, such as a Struts2 action class or a Spring MVC controller |
abstract String |
getActionId()
A string identifying the current action. |
static SessionAdapter |
getAdapter()
Get the ThreadLocal SessionAdapter associated with the
current request |
abstract Map<String,Object> |
getSessionContext()
Returns a session-scoped map. |
static void |
setAdapter(SessionAdapter adapter)
Set the ThreadLocal SessionAdapter for use with the current
request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static ThreadLocal<SessionAdapter> sessionAdapter
| Constructor Detail |
|---|
public SessionAdapter()
| Method Detail |
|---|
public abstract Object getAction()
public abstract String getActionId()
DefaultSessionConfigurationProvider is the name of the
controller method being executed.
public abstract Map<String,Object> getSessionContext()
public abstract void addPostProcessor(SessionPostProcessor sessionPostProcessor)
SessionPostProcessor that is guaranteed to be
executed after action execution. Calling
SessionPostProcessor.postProcessSession(SessionAdapter) is the
responsibility of the concrete SessionAdapter extending
class.
sessionPostProcessor - public static void setAdapter(SessionAdapter adapter)
ThreadLocal SessionAdapter for use with the current
request. Called in the constructor to force new instances into
the ThreadLocal.
adapter - public static SessionAdapter getAdapter()
ThreadLocal SessionAdapter associated with the
current request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||