com.google.code.rees.scope.spring
Class SpringConversationAdapter

java.lang.Object
  extended by com.google.code.rees.scope.conversation.ConversationAdapter
      extended by com.google.code.rees.scope.spring.SpringConversationAdapter
All Implemented Interfaces:
Serializable

public class SpringConversationAdapter
extends ConversationAdapter

An implementation of the ConversationAdapter for use with Spring MVC.

Author:
rees.byars
See Also:
Serialized Form

Field Summary
protected  Object action
           
protected  String actionId
           
protected  ConversationContextManager conversationContextManager
           
protected  javax.servlet.http.HttpServletRequest request
           
protected  Map<String,String> requestContext
           
protected  Map<String,Object> sessionContext
           
 
Fields inherited from class com.google.code.rees.scope.conversation.ConversationAdapter
conversationAdapter, postProcessorFactory, postProcessors, viewContext
 
Constructor Summary
SpringConversationAdapter(javax.servlet.http.HttpServletRequest request, org.springframework.web.method.HandlerMethod handler, ConversationContextManager conversationContextManager)
           
 
Method Summary
 ConversationContext beginConversation(String conversationName, long maxIdleTimeMillis)
          begins a new conversation, returning the context for the new conversation
 ConversationContext endConversation(String conversationName, String conversationId)
          Removes the conversation from the session, returning the context
 Object getAction()
          The controller instance, such as a Struts2 action class or a Spring MVC controller
 String getActionId()
          A string identifying the current action.
 ConversationContext getConversationContext(String conversationName, String conversationId)
          Returns a ConversationContext for the given name and ID
 Map<String,String> getRequestContext()
          Returns a map containing, at a minimum, conversation name/id key/value pairs for the current request.
 
Methods inherited from class com.google.code.rees.scope.conversation.ConversationAdapter
addPostProcessor, cleanup, doCleanup, executePostProcessors, getAdapter, getViewContext, setAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conversationContextManager

protected ConversationContextManager conversationContextManager

sessionContext

protected Map<String,Object> sessionContext

requestContext

protected Map<String,String> requestContext

action

protected Object action

actionId

protected String actionId

request

protected javax.servlet.http.HttpServletRequest request
Constructor Detail

SpringConversationAdapter

public SpringConversationAdapter(javax.servlet.http.HttpServletRequest request,
                                 org.springframework.web.method.HandlerMethod handler,
                                 ConversationContextManager conversationContextManager)
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 ConversationAdapter
Returns:

getActionId

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

Specified by:
getActionId in class ConversationAdapter
Returns:

getRequestContext

public Map<String,String> getRequestContext()
Returns a map containing, at a minimum, conversation name/id key/value pairs for the current request.

Specified by:
getRequestContext in class ConversationAdapter
Returns:

beginConversation

public ConversationContext beginConversation(String conversationName,
                                             long maxIdleTimeMillis)
begins a new conversation, returning the context for the new conversation

Specified by:
beginConversation in class ConversationAdapter
Returns:

getConversationContext

public ConversationContext getConversationContext(String conversationName,
                                                  String conversationId)
Returns a ConversationContext for the given name and ID

Specified by:
getConversationContext in class ConversationAdapter
Returns:

endConversation

public ConversationContext endConversation(String conversationName,
                                           String conversationId)
Removes the conversation from the session, returning the context

Specified by:
endConversation in class ConversationAdapter


Copyright © 2012-2013. All Rights Reserved.