Package org.jboss.remoting

Examples of org.jboss.remoting.Client.removeListener()


      assertTrue(handleThreadDone);
      assertTrue(acknowledgeThreadDone);
      assertFalse(pollerRunning);

      client.setDisconnectTimeout(0);
      client.removeListener(callbackHandler);
      client.disconnect();
   }
  
  
   /**
 
View Full Code Here


      assertTrue(handleThreadDone);
      assertTrue(acknowledgeThreadDone);
      assertFalse(pollerRunning);

      client.setDisconnectTimeout(0);
      client.removeListener(callbackHandler);
      client.disconnect();
   }
  
  
   protected String getTransport()
View Full Code Here

       * on the server.  Therefore a new Client, means the callback listener
       * key used for the remove will be different than the original one.
       */
      // client = new Client(new InvokerLocator(serverlocatorURI), "TEST");

      client.removeListener(listener1);

      assertEquals(1, serverHandler.size());

      try
      {
View Full Code Here

      assertEquals(1, serverHandler.size());

      try
      {
         client.removeListener(listener1);
         assertTrue("Expected to get exception for removing same listener twice.", false);
      }
      catch(Throwable thr)
      {
         assertTrue("Expected to get exception for removing same listener twice.", true);
View Full Code Here

      catch(Throwable thr)
      {
         assertTrue("Expected to get exception for removing same listener twice.", true);
      }

      client.removeListener(listener2);

      assertEquals(0, serverHandler.size());

      try
      {
View Full Code Here

      assertEquals(0, serverHandler.size());

      try
      {
         client.removeListener(listener2);
         assertTrue("Excpected to get exception from removing second listener twice.", false);
      }
      catch(Throwable thr)
      {
         assertTrue("Expected to get exception from removing second listener twice.", true);
View Full Code Here

      Thread.sleep(2 * pingFrequency);
      Long lastPing = (Long) field.get(t);
      log.info("current: " + System.currentTimeMillis() + ", lastPing: " + lastPing);
      assertTrue((System.currentTimeMillis() - lastPing.longValue()) < pingFrequency);
     
      client.removeListener(callbackHandler);
      client.disconnect();
   }
  
  
   public void testControlConnectionFailureServerSide() throws Throwable
View Full Code Here

      Thread.sleep(TEST_PING_FREQUENCY * MAX_INITIAL_ATTEMPTS);
      client.invoke(CALLBACK_TEST);
      // Callback should be possible because control connection has been replaced.
      assertEquals(1, callbackHandler.callbackCounter);
     
      client.removeListener(callbackHandler);
      client.disconnect();
   }
  
  
   public void testNoControlConnectionRestart() throws Throwable
View Full Code Here

      log.info("client added callback handler");
     
      client.invoke(CALLBACK_TEST);
      assertEquals(2, callbackHandler.callbackCounter);

      client.removeListener(callbackHandler);
      client.disconnect();
     
      // The ControlMonitorTimerTask from the first callback handler tries to recreate
      // its control connection, which adds an entry to
      // BisocketClientInvoker.listenerIdToSocketsMap which cannot be removed, which
View Full Code Here

      log.info("client added callback handler");
     
      client.invoke(CALLBACK_TEST);
      assertEquals(2, callbackHandler.callbackCounter);

      client.removeListener(callbackHandler);
      client.disconnect();
     
      // The ControlMonitorTimerTask from the first callback handler tries to recreate
      // its control connection, which adds an entry to
      // BisocketClientInvoker.listenerIdToSocketsMap which cannot be removed, which
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.