Package org.jboss.remoting.transport.socket

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


      for (Iterator it = threads.iterator(); it.hasNext(); )
      {
         ServerThread t = (ServerThread) it.next();
         field = ServerThread.class.getDeclaredField("socketWrapper");
         field.setAccessible(true);
         SocketWrapper socketWrapper = (SocketWrapper) field.get(t);
         socketWrapper.close();
      }
      connector.stop();
      log.info("STOPPED CONNECTOR");
     
      for (int i = 0; i < 5; i++)
View Full Code Here


      for (Iterator it = threads.iterator(); it.hasNext(); )
      {
         ServerThread t = (ServerThread) it.next();
         field = ServerThread.class.getDeclaredField("socketWrapper");
         field.setAccessible(true);
         SocketWrapper socketWrapper = (SocketWrapper) field.get(t);
         socketWrapper.close();
      }
      connector.stop();
      log.info("STOPPED CONNECTOR");
     
      for (int i = 0; i < 5; i++)
View Full Code Here

      for (Iterator it = threads.iterator(); it.hasNext(); )
      {
         ServerThread t = (ServerThread) it.next();
         field = ServerThread.class.getDeclaredField("socketWrapper");
         field.setAccessible(true);
         SocketWrapper socketWrapper = (SocketWrapper) field.get(t);
         socketWrapper.close();
      }
      connector.stop();
      log.info("STOPPED CONNECTOR");
     
      for (int i = 0; i < 5; i++)
View Full Code Here

      assertEquals(0, pool.size());
     
      Object response = client.invoke(NO_WAIT);
      assertEquals(NO_WAIT, response);
      assertEquals(1, pool.size());
      SocketWrapper socket = (SocketWrapper) pool.get(0);
      assertEquals(CONFIGURED_TIMEOUT, socket.getTimeout());
     
      HashMap metadata = new HashMap();
      metadata.put(ServerInvoker.TIMEOUT, "1000");
      response = client.invoke(NO_WAIT, metadata);
      assertEquals(NO_WAIT, response);
      assertEquals(1, pool.size());
      socket = (SocketWrapper) pool.get(0);
      assertEquals(CONFIGURED_TIMEOUT, socket.getTimeout());
   }
View Full Code Here

      MicroSocketClientInvoker invoker = (MicroSocketClientInvoker) client.getInvoker();
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(invoker);
      assertTrue(pool.size() > 0);
      SocketWrapper socketWrapper = (SocketWrapper) pool.get(0);
      Socket socket = socketWrapper.getSocket();
      doSocketTest(socket);
     
      client.disconnect();
      shutdownServer();
      log.info(getName() + " PASSES");
View Full Code Here

      assertEquals(0, pool.size());
     
      Object response = client.invoke(NO_WAIT);
      assertEquals(NO_WAIT, response);
      assertEquals(1, pool.size());
      SocketWrapper socket = (SocketWrapper) pool.get(0);
      assertEquals(CONFIGURED_TIMEOUT, socket.getTimeout());
     
      HashMap metadata = new HashMap();
      metadata.put(ServerInvoker.TIMEOUT, "1000");
      response = client.invoke(NO_WAIT, metadata);
      assertEquals(NO_WAIT, response);
      assertEquals(1, pool.size());
      socket = (SocketWrapper) pool.get(0);
      assertEquals(CONFIGURED_TIMEOUT, socket.getTimeout());
   }
View Full Code Here

      assertEquals(0, invoker.getNumberOfUsedConnections());
      assertEquals(INVOCATIONS, pool.size());
     
      for (int i = 0; i < INVOCATIONS; i++)
      {
         SocketWrapper wrapper = (SocketWrapper) pool.get(i);
         assertEquals("invalid timeout value: socket" + i, 5000, wrapper.getTimeout());
      }
     
      client.disconnect();
      connector.stop();
      log.info(getName() + " PASSES");
View Full Code Here

      // Get connection pool.
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(invoker);
      assertEquals(1, pool.size());
      SocketWrapper socketWrapper = (SocketWrapper) pool.get(0);
     
      for (int i = 0; i < 10000; i++)
      {
         client.invoke("xyz");
      }
View Full Code Here

      MicroSocketClientInvoker invoker = (MicroSocketClientInvoker) client.getInvoker();
      Field field = MicroSocketClientInvoker.class.getDeclaredField("pool");
      field.setAccessible(true);
      LinkedList pool = (LinkedList) field.get(invoker);
      assertEquals(1, pool.size());
      SocketWrapper socketWrapper = (SocketWrapper) pool.get(0);
     
      for (int i = 0; i < 10000; i++)
      {
         client.invoke("xyz");
      }
View Full Code Here

            }

            listenerIdToCallbackClientInvokerMap.remove(listenerId);
            for (Iterator it = pool.iterator(); it.hasNext();)
            {
               SocketWrapper socketWrapper = (SocketWrapper) it.next();
               try
               {
                  socketWrapper.close();
               }
               catch (Exception ignored)
               {
               }
            }
View Full Code Here

TOP

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

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.