Package org.jboss.remoting.transport.socket

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


     
      // Verify invocation can complete.
      assertEquals("abc", client.invoke("abc"));
     
      // 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


      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

      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

               // 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

      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("serverSocket");
      field.setAccessible(true);
      ServerSocket ss = (ServerSocket) field.get(ssi);
      assertNotNull(ss);
      System.out.println("ServerSocket bind address: " + ss.getInetAddress());
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("serverSocket");
      field.setAccessible(true);
      ServerSocket ss = (ServerSocket) field.get(ssi);
      assertNotNull(ss);
      System.out.println("ServerSocket bind address: " + ss.getInetAddress());
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("serverSocket");
      field.setAccessible(true);
      ServerSocket ss = (ServerSocket) field.get(ssi);
      assertNotNull(ss);
      System.out.println("ServerSocket bind address: " + ss.getInetAddress());
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("serverSocket");
      field.setAccessible(true);
      ServerSocket ss = (ServerSocket) field.get(ssi);
      assertNotNull(ss);
      System.out.println("ServerSocket bind address: " + ss.getInetAddress());
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

TOP

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

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.