Package org.jboss.remoting

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


      log.info("second invocation succeeded");
      assertEquals("xyz", client.invoke("xyz"));
      log.info("third invocation succeeded");
      assertEquals(1, TestServerThread.threadCounter);
     
      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
   }
  
  
View Full Code Here


      finally
      {
         if (theClient != null)
         {
            //https://jira.jboss.org/jira/browse/JBMESSAGING-1751
            theClient.disconnect();
         }
      }
   }

   public TopologyResult getTopology() throws JMSException
View Full Code Here

      // Verify ServerThread was discarded.
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      assertEquals(0, serverInvoker.getCurrentClientPoolSize());
      assertEquals(0, serverInvoker.getCurrentThreadPoolSize());
     
      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
   }
  
  
View Full Code Here

      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

      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

     
      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
      // interferes with testForLeaks().
View Full Code Here

     
      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
      // interferes with testForLeaks().
View Full Code Here

      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

         field = controlMonitorTimerTaskClass.getDeclaredField("controlConnectionThreadMap");
         field.setAccessible(true);
         assertNull("server invoker: " + j, field.get(controlMonitorTimerTask));   
      }
     
      client.disconnect();
   }
  
  
   public void testForLeaksQuickRemoveListener() throws Throwable
   {
View Full Code Here

         field = controlMonitorTimerTaskClass.getDeclaredField("controlConnectionThreadMap");
         field.setAccessible(true);
         assertNull("server invoker: " + j, field.get(controlMonitorTimerTask));   
      }
     
      client.disconnect();
   }
  
  
   public static void main(String[] args)
   {
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.