Examples of MicroSocketClientInvoker


Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      assertEquals(1, callbackHandlers.size());
      ServerInvokerCallbackHandler serverInvokerCallbackHandler;
      serverInvokerCallbackHandler = (ServerInvokerCallbackHandler) callbackHandlers.values().iterator().next();
      Client callbackClient = serverInvokerCallbackHandler.getCallbackClient();
      assertTrue(callbackClient.getInvoker() instanceof MicroSocketClientInvoker);
      MicroSocketClientInvoker callbackClientInvoker = (MicroSocketClientInvoker) callbackClient.getInvoker();
      field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(callbackClientInvoker);
      assertEquals(1, pool.size());
      Object o = pool.iterator().next();
View Full Code Here

Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      assertEquals(1, callbackHandlers.size());
      ServerInvokerCallbackHandler serverInvokerCallbackHandler;
      serverInvokerCallbackHandler = (ServerInvokerCallbackHandler) callbackHandlers.values().iterator().next();
      Client callbackClient = serverInvokerCallbackHandler.getCallbackClient();
      assertTrue(callbackClient.getInvoker() instanceof MicroSocketClientInvoker);
      MicroSocketClientInvoker callbackClientInvoker = (MicroSocketClientInvoker) callbackClient.getInvoker();
      field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(callbackClientInvoker);
      assertEquals(1, pool.size());
      Object o = pool.iterator().next();
View Full Code Here

Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      assertEquals(1, callbackHandlers.size());
      ServerInvokerCallbackHandler serverInvokerCallbackHandler;
      serverInvokerCallbackHandler = (ServerInvokerCallbackHandler) callbackHandlers.values().iterator().next();
      Client callbackClient = serverInvokerCallbackHandler.getCallbackClient();
      assertTrue(callbackClient.getInvoker() instanceof MicroSocketClientInvoker);
      MicroSocketClientInvoker callbackClientInvoker = (MicroSocketClientInvoker) callbackClient.getInvoker();
      field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(callbackClientInvoker);
      assertEquals(1, pool.size());
      Object o = pool.iterator().next();
View Full Code Here

Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      assertEquals(1, callbackHandlers.size());
      ServerInvokerCallbackHandler serverInvokerCallbackHandler;
      serverInvokerCallbackHandler = (ServerInvokerCallbackHandler) callbackHandlers.values().iterator().next();
      Client callbackClient = serverInvokerCallbackHandler.getCallbackClient();
      assertTrue(callbackClient.getInvoker() instanceof MicroSocketClientInvoker);
      MicroSocketClientInvoker callbackClientInvoker = (MicroSocketClientInvoker) callbackClient.getInvoker();
      field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(callbackClientInvoker);
      assertEquals(1, pool.size());
      Object o = pool.iterator().next();
View Full Code Here

Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      assertEquals(1, callbackHandlers.size());
      ServerInvokerCallbackHandler serverInvokerCallbackHandler;
      serverInvokerCallbackHandler = (ServerInvokerCallbackHandler) callbackHandlers.values().iterator().next();
      Client callbackClient = serverInvokerCallbackHandler.getCallbackClient();
      assertTrue(callbackClient.getInvoker() instanceof MicroSocketClientInvoker);
      MicroSocketClientInvoker callbackClientInvoker = (MicroSocketClientInvoker) callbackClient.getInvoker();
      field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(callbackClientInvoker);
      assertEquals(1, pool.size());
      Object o = pool.iterator().next();
View Full Code Here

Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      assertEquals(1, callbackHandlers.size());
      ServerInvokerCallbackHandler serverInvokerCallbackHandler;
      serverInvokerCallbackHandler = (ServerInvokerCallbackHandler) callbackHandlers.values().iterator().next();
      Client callbackClient = serverInvokerCallbackHandler.getCallbackClient();
      assertTrue(callbackClient.getInvoker() instanceof MicroSocketClientInvoker);
      MicroSocketClientInvoker callbackClientInvoker = (MicroSocketClientInvoker) callbackClient.getInvoker();
      field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(callbackClientInvoker);
      assertEquals(1, pool.size());
      Object o = pool.iterator().next();
View Full Code Here

Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      assertEquals(1, callbackHandlers.size());
      ServerInvokerCallbackHandler serverInvokerCallbackHandler;
      serverInvokerCallbackHandler = (ServerInvokerCallbackHandler) callbackHandlers.values().iterator().next();
      Client callbackClient = serverInvokerCallbackHandler.getCallbackClient();
      assertTrue(callbackClient.getInvoker() instanceof MicroSocketClientInvoker);
      MicroSocketClientInvoker callbackClientInvoker = (MicroSocketClientInvoker) callbackClient.getInvoker();
      field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(callbackClientInvoker);
      assertEquals(1, pool.size());
      pool.clear();
View Full Code Here

Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      addExtraClientConfig(clientConfig);
      Client client = new Client(clientLocator, clientConfig);
      client.connect();
      log.info("client is connected");
     
      MicroSocketClientInvoker clientInvoker = (MicroSocketClientInvoker) client.getInvoker();
      assertEquals(10, clientInvoker.getNumberOfAvailableConnections());
     
      for (int i = 0; i < 5000; i++)
      {
         assertEquals(Integer.toString(i), (String) client.invoke(Integer.toString(i)));
      }
     
      assertEquals(10, clientInvoker.getNumberOfAvailableConnections());
     
      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
   }
View Full Code Here

Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      addExtraClientConfig(clientConfig);
      Client client = new Client(clientLocator, clientConfig);
      client.connect();
      log.info("client is connected");
     
      MicroSocketClientInvoker clientInvoker = (MicroSocketClientInvoker) client.getInvoker();
      assertEquals(1, clientInvoker.getNumberOfAvailableConnections());
     
      for (int i = 0; i < 5000; i++)
      {
         assertEquals(Integer.toString(i), (String) client.invoke(Integer.toString(i)));
      }
     
      assertEquals(1, clientInvoker.getNumberOfAvailableConnections());
     
      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
   }
View Full Code Here

Examples of org.jboss.remoting.transport.socket.MicroSocketClientInvoker

      addExtraClientConfig(clientConfig);
      final Client client = new Client(clientLocator, clientConfig);
      client.connect();
      log.info("client is connected");
     
      MicroSocketClientInvoker clientInvoker = (MicroSocketClientInvoker) client.getInvoker();
      assertEquals(10, clientInvoker.getNumberOfAvailableConnections());
     
      final HashMap metadata = new HashMap();
      metadata.put(DURATION, "20000");
     
      for (int i = 0; i < 20; i++)
      {
         new Thread()
         {
            public void run()
            {
               try
               {
                  client.invoke(WAIT, metadata);
               }
               catch (Throwable e)
               {
                  log.error("Error", e);
               }
            }
         }.start();
      }
     
      Thread.sleep(10000);
      assertEquals(10, invocationHandler.counter);
      assertEquals(0, clientInvoker.getNumberOfAvailableConnections());
     
      Thread.sleep(20000);
      assertEquals(20, invocationHandler.counter);
      assertEquals(0, clientInvoker.getNumberOfAvailableConnections());
     
      Thread.sleep(20000);
      assertEquals(20, invocationHandler.counter);
      assertEquals(10, clientInvoker.getNumberOfAvailableConnections());
     
      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
   }
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.