Package org.jboss.remoting.transport.socket

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


      Field field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(serverInvoker);
      Set threads = clientpool.getContents();
      assertEquals(1, threads.size());
      ServerThread serverThread = (ServerThread) threads.iterator().next();
      field = ServerThread.class.getDeclaredField("socketWrapper");
      field.setAccessible(true);
      assertTrue(field.get(serverThread) instanceof ServerSocketWrapper);
      ServerSocketWrapper serverWrapper = (ServerSocketWrapper) field.get(serverThread);
      assertEquals(3000, serverWrapper.getTimeout());
View Full Code Here


               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");
            }
View Full Code Here

      field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(ssi);
      assertEquals(1, clientpool.size());
      Set threads = clientpool.getContents();
      ServerThread serverThread = (ServerThread) threads.iterator().next();
      field = ServerThread.class.getDeclaredField("socketWrapper");
      field.setAccessible(true);
      ServerSocketWrapper ssw = (ServerSocketWrapper) field.get(serverThread);
      field = ClientSocketWrapper.class.getDeclaredField("in");
      field.setAccessible(true);
View Full Code Here

      field = SocketServerInvoker.class.getDeclaredField("clientpool");
      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(ssi);
      assertEquals(1, clientpool.size());
      Set threads = clientpool.getContents();
      ServerThread serverThread = (ServerThread) threads.iterator().next();
      field = ServerThread.class.getDeclaredField("socketWrapper");
      field.setAccessible(true);
      ServerSocketWrapper ssw = (ServerSocketWrapper) field.get(serverThread);
      field = ClientSocketWrapper.class.getDeclaredField("in");
      field.setAccessible(true);
View Full Code Here

               if(clientpool.size() < maxPoolSize)
               {
                  Thread thread = null;
                  try
                  {
                     thread = new ServerThread(socket, BisocketServerInvoker.this,
                                               clientpool, threadpool,
                                               getTimeout(), serverSocketClass);
                     thread.start();

                     if (log.isDebugEnabled())
View Full Code Here

      assertEquals(1, callbackHandler.received);
      Set serverThreads = clientpool.getContents();  
      Iterator it = serverThreads.iterator();
      while (it.hasNext())
      {
         ServerThread st = (ServerThread) it.next();
         st.shutdown();
      }
      client.invoke(SEND_CALLBACK);
      assertEquals(2, callbackHandler.received);
      serverThreads = clientpool.getContents();  
      it = serverThreads.iterator();
      while (it.hasNext())
      {
         ServerThread st = (ServerThread) it.next();
         st.shutdown();
      }
      client.invoke(SEND_CALLBACK);
      assertEquals(3, callbackHandler.received);
     
      client.removeListener(callbackHandler);
View Full Code Here

/* 837 */           if (BisocketServerInvoker.this.clientpool.size() < BisocketServerInvoker.this.maxPoolSize)
/*     */           {
/* 839 */             Thread thread = null;
/*     */             try
/*     */             {
/* 842 */               thread = new ServerThread(socket, BisocketServerInvoker.this, BisocketServerInvoker.this.clientpool, BisocketServerInvoker.this.threadpool, BisocketServerInvoker.this.getTimeout(), BisocketServerInvoker.this.serverSocketClass);
/*     */
/* 845 */               thread.start();
/*     */
/* 847 */               if (BisocketServerInvoker.log.isDebugEnabled())
/* 848 */                 BisocketServerInvoker.log.debug("created: " + thread);
View Full Code Here

      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(invoker);
      Set threads = clientpool.getContents();
      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();
      }
View Full Code Here

      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(invoker);
      Set threads = clientpool.getContents();
      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();
      }
View Full Code Here

      field.setAccessible(true);
      LRUPool clientpool = (LRUPool) field.get(invoker);
      Set threads = clientpool.getContents();
      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();
      }
View Full Code Here

TOP

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

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.