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

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


           
            if (LOG.isDebugEnabled()) {
                LOG.debug("Beginning new " + conversationName+ " with max idle time of " + maxIdleTime / 1000 + " seconds for action " + actionId);
            }
           
            ConversationContext newConversationContext = ConversationUtil.begin(conversationName, conversationAdapter, maxIdleTime);
            conversationId = newConversationContext.getId();
            conversationAdapter.addPostProcessor(this, conversationConfig, conversationId);
           
        }
    }
View Full Code Here


    HttpConversationContextManagerProvider managerProvider = new DefaultHttpConversationContextManagerProvider();
    managerProvider.setConversationContextFactory(new DefaultConversationContextFactory());
    managerProvider.setMonitoringFrequency(1L);
    managerProvider.init();
    MockConversationAdapter.init(request, managerProvider);
    ConversationContext context = ConversationUtil.begin(mockConversationName, 50L);
    context.addTimeoutListener(this);
    context.setMaxIdleTime(50L);
    try {
      Thread.sleep(2000L);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
View Full Code Here

    public static <T extends ProgrammaticModelDrivenConversation<?>> void begin(
            T controller) {
        Object model = controller.getModel();
        for (String conversationName : controller.getConversations()) {
            ConversationContext conversationContext = ConversationUtil
                    .begin(conversationName);
            conversationContext.put(conversationName, model);
        }
    }
View Full Code Here

   * @param adapter
   * @param maxIdleTimeMillis
   * @return
   */
  public static ConversationContext begin(String name, ConversationAdapter adapter, long maxIdleTimeMillis) {
    ConversationContext context = adapter.beginConversation(name, maxIdleTimeMillis);
    String id = context.getId();
    adapter.getViewContext().put(name, id);
    adapter.getRequestContext().put(name, id);
    return context;
  }
View Full Code Here

           
            if (LOG.isDebugEnabled()) {
                LOG.debug("Beginning new " + conversationName+ " with max idle time of " + maxIdleTime / 1000 + " seconds for action " + actionId);
            }
           
            ConversationContext newConversationContext = ConversationUtil.begin(conversationName, conversationAdapter, maxIdleTime);
            conversationId = newConversationContext.getId();
            conversationAdapter.addPostProcessor(this, conversationConfig, conversationId);
           
        }
    }
View Full Code Here

   *
   * @param name
   * @return a new {@link ConversationContext}
   */
  public static ConversationContext begin(String name, ConversationAdapter adapter) {
    ConversationContext context = adapter.beginConversation(name);
    String id = context.getId();
    adapter.getViewContext().put(name, id);
    adapter.getRequestContext().put(name, id);
    return context;
  }
View Full Code Here

   * @param adapter
   * @param maxIdleTimeMillis
   * @return
   */
  public static ConversationContext begin(String name, ConversationAdapter adapter, long maxIdleTimeMillis) {
    ConversationContext context = adapter.beginConversation(name, maxIdleTimeMillis);
    String id = context.getId();
    adapter.getViewContext().put(name, id);
    adapter.getRequestContext().put(name, id);
    return context;
  }
View Full Code Here

    HttpConversationContextManagerFactory managerFactory = new DefaultHttpConversationContextManagerFactory();
    managerFactory.setConversationContextFactory(new DefaultConversationContextFactory());
    managerFactory.setMonitoringFrequency(1L);
    managerFactory.init();
    MockConversationAdapter.init(request, managerFactory);
    ConversationContext context = ConversationUtil.begin(mockConversationName);
    context.addTimeoutListener(this);
    context.setMaxIdleTime(50L);
    try {
      Thread.sleep(2000L);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
View Full Code Here

           
            if (LOG.isDebugEnabled()) {
                LOG.debug("Beginning new " + conversationName+ " with max idle time of " + maxIdleTime / 1000 + " seconds for action " + actionId);
            }
           
            ConversationContext newConversationContext = ConversationUtil.begin(conversationName, conversationAdapter, maxIdleTime);
            conversationId = newConversationContext.getId();
            conversationAdapter.addPostProcessor(this, conversationConfig, conversationId);
           
        }
    }
View Full Code Here

    HttpConversationContextManagerFactory managerFactory = new DefaultHttpConversationContextManagerFactory();
    managerFactory.setConversationContextFactory(new DefaultConversationContextFactory());
    managerFactory.setMonitoringFrequency(1L);
    managerFactory.init();
    MockConversationAdapter.init(request, managerFactory);
    ConversationContext context = ConversationUtil.begin(mockConversationName, 50L);
    context.addTimeoutListener(this);
    context.setMaxIdleTime(50L);
    try {
      Thread.sleep(2000L);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

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

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.