Package org.jboss.remoting.transport.socket

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


      assertFalse(-1 == connectorLocatorUrl.indexOf(hostName));

      // Verify that the ServerSocket is bound to address 0.0.0.0.
      ServerInvoker si = connector.getServerInvoker();
      assertTrue(si instanceof SocketServerInvoker);
      SocketServerInvoker ssi = (SocketServerInvoker) si;
      Field field = SocketServerInvoker.class.getDeclaredField("serverSockets");
      field.setAccessible(true);
      List serverSockets = (List) field.get(ssi);
      ServerSocket ss = (ServerSocket) serverSockets.get(0);
      assertNotNull(ss);
View Full Code Here


      assertFalse(-1 == connectorLocatorUrl.indexOf(hostName));

      // Verify that the ServerSocket is bound to address 0.0.0.0.
      ServerInvoker si = connector.getServerInvoker();
      assertTrue(si instanceof SocketServerInvoker);
      SocketServerInvoker ssi = (SocketServerInvoker) si;
      Field field = SocketServerInvoker.class.getDeclaredField("serverSockets");
      field.setAccessible(true);
      List serverSockets = (List) field.get(ssi);
      ServerSocket ss = (ServerSocket) serverSockets.get(0);
      assertNotNull(ss);
View Full Code Here

      // Test connections.
      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      // Get ServerThread.
      SocketServerInvoker invoker = (SocketServerInvoker) connector.getServerInvoker();
      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(invoker);
      assertEquals(1, clientpool.size());
      Set s =  clientpool.getContents();
View Full Code Here

         fail("got unexpected Exception");
      }
     
      // Test server invoker state.
      Thread.sleep(4000);
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.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

      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

      if (connector != null)
      {
         // Remoting versions 1.x and 2.2.x don't necessarily shut down all of their
         // ServerThreads, so an exiting connection could connect to a ServerThread
         // associated with the old ServerInvoker.
         SocketServerInvoker invoker = (SocketServerInvoker) connector.getServerInvoker();
         Field clientpoolField = SocketServerInvoker.class.getDeclaredField("clientpool");
         clientpoolField.setAccessible(true);
         Field socketWrapperField = ServerThread.class.getDeclaredField("socketWrapper");
         socketWrapperField.setAccessible(true);
         LRUPool clientpool = (LRUPool) clientpoolField.get(invoker);
View Full Code Here

      if (connector != null)
      {
         // Remoting versions 1.x and 2.2.x don't necessarily shut down all of their
         // ServerThreads, so an exiting connection could connect to a ServerThread
         // associated with the old ServerInvoker.
         SocketServerInvoker invoker = (SocketServerInvoker) connector.getServerInvoker();
         Field clientpoolField = SocketServerInvoker.class.getDeclaredField("clientpool");
         clientpoolField.setAccessible(true);
         Field socketWrapperField = ServerThread.class.getDeclaredField("socketWrapper");
         socketWrapperField.setAccessible(true);
         LRUPool clientpool = (LRUPool) clientpoolField.get(invoker);
View Full Code Here

      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      //Test configuration.
      MicroSocketClientInvoker clientInvoker = (MicroSocketClientInvoker) client.getInvoker();
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      assertEquals(LOCATOR_VALUE_CONNECTION_WAIT, clientInvoker.getConnectionWait());
      assertEquals(LOCATOR_VALUE_BACKLOG, serverInvoker.getBacklog());
     
      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
   }
View Full Code Here

      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      //Test configuration.
      MicroSocketClientInvoker clientInvoker = (MicroSocketClientInvoker) client.getInvoker();
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      assertEquals(LOCATOR_VALUE_CONNECTION_WAIT, clientInvoker.getConnectionWait());
      assertEquals(LOCATOR_VALUE_BACKLOG, serverInvoker.getBacklog());
     
      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
   }
View Full Code Here

      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      //Test configuration.
      MicroSocketClientInvoker clientInvoker = (MicroSocketClientInvoker) client.getInvoker();
      SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
      assertEquals(CONFIG_VALUE_CONNECTION_WAIT, clientInvoker.getConnectionWait());
      assertEquals(CONFIG_VALUE_BACKLOG, serverInvoker.getBacklog());
     
      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
   }
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.