Package org.jboss.remoting

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


         if (client != null)
         {
            // Note. Calling Client.disconnect() does remove the InvokerCallbackHandler registered
            // above. For the http transport, the CallbackPoller will continue running, which will
            // generate a lot of ERROR log messages after the server has shut down.
            client.removeListener(callbackHandler);
            client.disconnect();
         }

         RemotingTestSubsystemService.undeployService(subsystemService);
      }
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

      field.setAccessible(true);
      Map controlConnectionThreadMap = (Map) field.get(callbackServerInvoker);
      assertEquals(0, controlConnectionThreadMap.size());
     
      client.setDisconnectTimeout(0);
      client.removeListener(callbackHandler);
      client.disconnect();
   }
  
  
   public void testForLeaks() throws Throwable
View Full Code Here

         assertNotNull(field.get(serverInvokers[j]));
      }
     
      for (int j = 0; j < CALLBACK_HANDLER_COUNT; j++)
      {
         client.removeListener(callbackHandlers[j]);
      }
     
      assertEquals(0, listenerIdToServerInvokerMap.size());
      assertEquals(0, listenerIdToClientInvokerMap.size());
      assertEquals(0, listenerIdToCallbackClientInvokerMap.size());
View Full Code Here

     
      client.setDisconnectTimeout(0);
     
      for (int j = 0; j < CALLBACK_HANDLER_COUNT; j++)
      {
         client.removeListener(callbackHandlers[j]);
      }
     
      assertEquals(0, listenerIdToServerInvokerMap.size());
      assertEquals(0, listenerIdToClientInvokerMap.size());
     
View Full Code Here

                  log.info("client.invoke(\"test\") failed (that's OK)");
               }
              
               // Set disconnectTimeout to 0.
               client.setDisconnectTimeout(0);
               client.removeListener(callbackHandler);
               removeListener.done = true;
               log.info("returned from client.removeListener()");
            }
            catch (Throwable e)
            {
View Full Code Here

               }
              
               // Set disconnectTimeout to 1 second.
               client.setDisconnectTimeout(shortTimeout());
               log.info("calling client.removeListener()");
               client.removeListener(callbackHandler);
               removeListener.done = true;
               log.info("returned from client.removeListener()");
            }
            catch (Throwable e)
            {
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.