Package org.jboss.remoting.transport.socket

Examples of org.jboss.remoting.transport.socket.SocketServerInvoker$AcceptThread


      Thread.sleep(20000);
      log.info("back from sleep");
      Set callbackConnectors = client.getCallbackConnectors(callbackHandler);
      assertEquals(1, callbackConnectors.size());
      Connector callbackConnector = (Connector) callbackConnectors.iterator().next();
      SocketServerInvoker serverInvoker = (SocketServerInvoker) callbackConnector.getServerInvoker();
      assertEquals(0, serverInvoker.getCurrentClientPoolSize());
      assertEquals(1, serverInvoker.getCurrentThreadPoolSize());
      log.info("used ServerThread has returned to threadPool");

      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
View Full Code Here


      client.addListener(callbackHandler, new InvokerLocator(callbackLocatorURI));
      log.info("client added callback handler");
      client.invoke(CALLBACK_TEST);
      assertEquals(1, callbackHandler.callbackCounter);
     
      SocketServerInvoker invoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(invoker);
      Set threads = clientpool.getContents();
      for (Iterator it = threads.iterator(); it.hasNext(); )
View Full Code Here

      log.info("client added callback handler");
      client.invoke(CALLBACK_TEST);
      assertEquals(1, callbackHandler.callbackCounter);
     
      Connector oldConnector = connector;
      SocketServerInvoker invoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(invoker);
      Set threads = clientpool.getContents();
      for (Iterator it = threads.iterator(); it.hasNext(); )
View Full Code Here

      log.info("client added callback handler");
      client.invoke(CALLBACK_TEST);
      assertEquals(1, callbackHandler.callbackCounter);
     
      Connector oldConnector = connector;
      SocketServerInvoker invoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(invoker);
      Set threads = clientpool.getContents();
      for (Iterator it = threads.iterator(); it.hasNext(); )
View Full Code Here

      assertEquals(1, callbackHandler.counter);
      log.info("callback handler is installed");

      // Verify that "timeout" is used correctly.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(serverInvoker);
      Set threads = clientpool.getContents();
      assertEquals(1, threads.size());
View Full Code Here

      assertEquals(1, callbackHandler.counter);
      log.info("callback handler is installed");

      // Verify that "timeout" is used correctly.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(serverInvoker);
      Set threads = clientpool.getContents();
      assertEquals(1, threads.size());
View Full Code Here

      assertEquals(1, callbackHandler.counter);
      log.info("callback handler is installed");

      // Verify that "timeout" is used correctly.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(serverInvoker);
      Set threads = clientpool.getContents();
      assertEquals(1, threads.size());
View Full Code Here

      client.invoke(CALLBACK_TEST);
      assertEquals(1, callbackHandler.counter);
      log.info("callback handler is installed");

      // Verify that "callbackTimeout" is used correctly.
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = ServerInvoker.class.getDeclaredField("callbackHandlers");
      field.setAccessible(true);
      Map callbackHandlers = (Map) field.get(serverInvoker);
      assertEquals(1, callbackHandlers.size());
      ServerInvokerCallbackHandler serverInvokerCallbackHandler;
View Full Code Here

               // Give the client a chance to connect to the server, then
               // disable the server.
               Thread.sleep(2000);
               ServerInvoker si = connector.getServerInvoker();
               assertTrue(si instanceof SocketServerInvoker);
               SocketServerInvoker ssi = (SocketServerInvoker) si;
               Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
               field.setAccessible(true);
               LRUPool clientpool = (LRUPool) field.get(ssi);
               Set threads = clientpool.getContents();
               Iterator it = threads.iterator();
               while (it.hasNext())
               {
                  ServerThread t = (ServerThread) it.next();
                  t.shutdown();
               }

               ssi.setMaxPoolSize(0);
               log.info("server is disabled");
            }
            catch (Exception e)
            {
               log.info(e);
View Full Code Here

      assertEquals(1, callbackHandler.counter);
      log.info("callback handler is installed");

      // Verify that "timeout" is used correctly.
      assertTrue(connector.getServerInvoker() instanceof SocketServerInvoker);
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(serverInvoker);
      Set threads = clientpool.getContents();
      assertEquals(1, threads.size());
View Full Code Here

TOP

Related Classes of org.jboss.remoting.transport.socket.SocketServerInvoker$AcceptThread

Copyright © 2018 www.massapicom. 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.