Package com.google.code.rees.scope.conversation.context

Examples of com.google.code.rees.scope.conversation.context.ConversationContextManager


    @Override
    public ConversationAdapter createConversationAdapter() {
        ActionContext actionContext = ActionContext.getContext();
        HttpServletRequest request = (HttpServletRequest) actionContext
                .get(StrutsStatics.HTTP_REQUEST);
        ConversationContextManager contextManager = conversationContextManagerFactory
                .getManager(request);
        ActionInvocation invocation = actionContext.getActionInvocation();
        return new StrutsConversationAdapter(invocation, contextManager);
    }
View Full Code Here


     */
    @Override
    public String intercept(ActionInvocation invocation) throws Exception {
     
      HttpServletRequest request = (HttpServletRequest) invocation.getInvocationContext().get(StrutsStatics.HTTP_REQUEST);
      ConversationContextManager contextManager = this.conversationContextManagerProvider.getManager(request);
     
      try {
       
        this.conversationProcessor.processConversations(new StrutsConversationAdapter(invocation, contextManager));
       
View Full Code Here

     * passes in a {@link SpringConversationAdapter}.
     */
    @Override
    public boolean preHandle(HttpServletRequest request,
            HttpServletResponse response, Object handler) throws Exception {
        ConversationContextManager contextManager = conversationContextManagerFactory
                .getManager(request);
        ConversationAdapter adapter = new SpringConversationAdapter(request,
                (HandlerMethod) handler, contextManager);
        conversationManager.processConversations(adapter);
        return true;
View Full Code Here

     * {@link ConversationManager#processConversations(ConversationAdapter)} and
     * passes in a {@link SpringConversationAdapter}.
     */
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        ConversationContextManager contextManager = conversationContextManagerFactory.getManager(request);
        ConversationAdapter adapter = new SpringConversationAdapter(request, (HandlerMethod) handler, contextManager);
        conversationManager.processConversations(adapter);
        return true;
    }
View Full Code Here

    public String intercept(ActionInvocation invocation) throws Exception {
     
      try {
       
        HttpServletRequest request = (HttpServletRequest) invocation.getInvocationContext().get(StrutsStatics.HTTP_REQUEST);
          ConversationContextManager contextManager = this.conversationContextManagerProvider.getManager(request);
          final ConversationAdapter adapter = new StrutsConversationAdapter(invocation, contextManager);
       
        this.conversationProcessor.processConversations(adapter);
       
        invocation.addPreResultListener(new PreResultListener() {
View Full Code Here

     * {@inheritDoc}
     */
    public void prepare() {
      ActionContext actionContext = ActionContext.getContext();
      HttpServletRequest request = (HttpServletRequest) actionContext.get(StrutsStatics.HTTP_REQUEST);
      ConversationContextManager contextManager = this.conversationContextManagerProvider.getManager(request);
        try {
      this.conversationProcessor.processConversations(new StrutsConversationAdapter(actionContext.getActionInvocation(), contextManager));
      Map<String, Map<String, String>> stackItem = new HashMap<String, Map<String, String>>();
          stackItem.put(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY, ConversationAdapter.getAdapter().getViewContext());
          actionContext.getValueStack().push(stackItem);
View Full Code Here

    public String intercept(ActionInvocation invocation) throws Exception {
     
      try {
       
        HttpServletRequest request = (HttpServletRequest) invocation.getInvocationContext().get(StrutsStatics.HTTP_REQUEST);
          ConversationContextManager contextManager = contextManagerProvider.getManager(request);
          final ConversationAdapter adapter = new StrutsConversationAdapter(invocation, contextManager);
       
        processor.processConversations(adapter);
       
        invocation.addPreResultListener(new PreResultListener() {
View Full Code Here

    }

    @Override
    public String intercept(ActionInvocation invocation) throws Exception {
      HttpServletRequest request = (HttpServletRequest) invocation.getInvocationContext().get(StrutsStatics.HTTP_REQUEST);
      ConversationContextManager contextManager = this.conversationContextManagerFactory.getManager(request);
        this.conversationManager.processConversations(new StrutsConversationAdapter(invocation, contextManager));
        invocation.addPreResultListener(this);
        return invocation.invoke();
    }
View Full Code Here

     * {@inheritDoc}
     */
    public void prepare() {
      ActionContext actionContext = ActionContext.getContext();
      HttpServletRequest request = (HttpServletRequest) actionContext.get(StrutsStatics.HTTP_REQUEST);
      ConversationContextManager contextManager = this.conversationContextManagerFactory.getManager(request);
        try {
      this.conversationManager.processConversations(new StrutsConversationAdapter(actionContext.getActionInvocation(), contextManager));
      Map<String, Map<String, String>> stackItem = new HashMap<String, Map<String, String>>();
          stackItem.put(StrutsScopeConstants.CONVERSATION_ID_MAP_STACK_KEY, ConversationAdapter.getAdapter().getViewContext());
          actionContext.getValueStack().push(stackItem);
View Full Code Here

        HttpSession session = request.getSession();
        Object ctxMgr = null;
        ctxMgr = session
                .getAttribute(ConversationConstants.CONVERSATION_CONTEXT_MANAGER_KEY);
        if (ctxMgr == null) {
            ConversationContextManager newCtxMgr = new DefaultConversationContextManager();
            newCtxMgr.setContextFactory(this.conversationContextFactory);
            newCtxMgr.setMaxInstances(this.maxInstances);
            newCtxMgr.setMonitoringFrequency(this.monitoringFrequency);
            ctxMgr = newCtxMgr;
            session.setAttribute(
                    ConversationConstants.CONVERSATION_CONTEXT_MANAGER_KEY,
                    ctxMgr);
        }
View Full Code Here

TOP

Related Classes of com.google.code.rees.scope.conversation.context.ConversationContextManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.