Examples of addTimeoutListener()


Examples of com.google.code.rees.scope.conversation.context.ConversationContext.addTimeoutListener()

    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

Examples of com.google.code.rees.scope.conversation.context.ConversationContext.addTimeoutListener()

    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

Examples of com.google.code.rees.scope.conversation.context.ConversationContext.addTimeoutListener()

    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

Examples of com.google.code.rees.scope.conversation.context.ConversationContext.addTimeoutListener()

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

Examples of org.xmlBlaster.util.Timeout.addTimeoutListener()

      System.out.println("***TimeoutTest: testTimeout ...");

      {
         event = false;
         Timeout timeout = new Timeout(ME);
         Timestamp timeoutHandle = timeout.addTimeoutListener(new I_Timeout() {
               public void timeout(Object userData) {
                  event = true;
                  log.info("Timeout happened after 0 millisec");
               }
            },
View Full Code Here

Examples of org.xmlBlaster.util.Timeout.addTimeoutListener()

      }
     
      {
         event = false;
         Timeout timeout = new Timeout(ME);
         Timestamp timeoutHandle = timeout.addTimeoutListener(new I_Timeout() {
               public void timeout(Object userData) {
                  event = true;
                  log.info("Timeout happened after 500 millisec");
               }
            },
View Full Code Here

Examples of org.xmlBlaster.util.Timeout.addTimeoutListener()

      }
     
      {
         event = false;
         Timeout timeout = new Timeout(ME);
         Timestamp timeoutHandle = timeout.addTimeoutListener(new I_Timeout() {
               public void timeout(Object userData) {
                  event = true;
                  log.severe("Timeout happened after 1 sec");
               }
            },
View Full Code Here

Examples of org.xmlBlaster.util.Timeout.addTimeoutListener()

            }
            counter++;
         }
      }
      Dummy1 dummy = new Dummy1();
      keyArr[2] = timeout.addTimeoutListener(dummy, 4000L, "timer-4000");

      keyArr[3] = timeout.addTimeoutListener(dummy, 2000L, "timer-5500");
      try { keyArr[3] = timeout.refreshTimeoutListener(keyArr[3], 5500L); } catch (XmlBlasterException e) { fail("Refresh failed: " + e.getMessage()); }
      long diffT = keyArr[3].getMillis() - System.currentTimeMillis();
      assertTrue("ERROR: refresh failed", (Math.abs(5500L - diffT) <= 30));
View Full Code Here

Examples of org.xmlBlaster.util.Timeout.addTimeoutListener()

         }
      }
      Dummy1 dummy = new Dummy1();
      keyArr[2] = timeout.addTimeoutListener(dummy, 4000L, "timer-4000");

      keyArr[3] = timeout.addTimeoutListener(dummy, 2000L, "timer-5500");
      try { keyArr[3] = timeout.refreshTimeoutListener(keyArr[3], 5500L); } catch (XmlBlasterException e) { fail("Refresh failed: " + e.getMessage()); }
      long diffT = keyArr[3].getMillis() - System.currentTimeMillis();
      assertTrue("ERROR: refresh failed", (Math.abs(5500L - diffT) <= 30));

      keyArr[0] = timeout.addTimeoutListener(dummy, 1000L, "timer-1000");
View Full Code Here

Examples of org.xmlBlaster.util.Timeout.addTimeoutListener()

      keyArr[3] = timeout.addTimeoutListener(dummy, 2000L, "timer-5500");
      try { keyArr[3] = timeout.refreshTimeoutListener(keyArr[3], 5500L); } catch (XmlBlasterException e) { fail("Refresh failed: " + e.getMessage()); }
      long diffT = keyArr[3].getMillis() - System.currentTimeMillis();
      assertTrue("ERROR: refresh failed", (Math.abs(5500L - diffT) <= 30));

      keyArr[0] = timeout.addTimeoutListener(dummy, 1000L, "timer-1000");
      keyArr[1] = timeout.addTimeoutListener(dummy, 1000L, "timer-1000");

      long span = timeout.spanToTimeout(keyArr[2]);
      assertTrue("*****ERROR: This short span to timeout = " + span + " is probably wrong, or you have a very slow computer.", span >= 3000L);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.