Package org.jboss.remoting.transport.socket

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


   public static class TestClientFactory implements ClientFactory
   {
      public ClientInvoker createClientInvoker(InvokerLocator locator, Map config) throws IOException
      {
         log.info("TestClientFaotory.createClientInvoker() called");
         return new SocketClientInvoker(locator, config);
      }
View Full Code Here


   public static class TestClientFactory implements ClientFactory
   {
      public ClientInvoker createClientInvoker(InvokerLocator locator, Map config) throws IOException
      {
         log.info("TestClientFaotory.createClientInvoker() called");
         return new SocketClientInvoker(locator, config);
      }
View Full Code Here

   public void testUniqueLeaseTimerTask() throws Throwable
   {
      log.info("entering " + getName());
     
      setupServer();
      SocketClientInvoker clientInvoker = new SocketClientInvoker(serverLocator);
      clientInvoker.connect();
      LeasePinger leasePinger = new LeasePinger(clientInvoker, "abc", 2000);
      log.info("expect WARN \"failed to ping to server\"");
      Method method = LeasePinger.class.getDeclaredMethod("setLeasePingerId", new Class[]{String.class});
      method.setAccessible(true);
      method.invoke(leasePinger, new Object[]{"dummyID"});
View Full Code Here

      try
      {
         connector.start();
         client.connect();

         SocketClientInvoker invoker = (SocketClientInvoker)client.getInvoker();

         assertEquals(callRetries, invoker.getNumberOfCallRetries());
         assertEquals(timeout, invoker.getTimeout());
         assertEquals(Boolean.FALSE.booleanValue(), invoker.checkingConnection());
      }
      finally
      {
         client.disconnect();
         connector.stop();
View Full Code Here

   public static class TestClientFactory implements ClientFactory
   {
      public ClientInvoker createClientInvoker(InvokerLocator locator, Map config) throws IOException
      {
         log.info("TestClientFaotory.createClientInvoker() called");
         return new SocketClientInvoker(locator, config);
      }
View Full Code Here

      client.addListener(callbackHandler, metadata);
      log.info("callback handler is installed");
     
      // Make sure callback client invoker has timeout == 0.
      Client callbackClient = invocationHandler.callbackHandler.getCallbackClient();
      SocketClientInvoker callbackClientInvoker = (SocketClientInvoker) callbackClient.getInvoker();
      assertEquals(0, callbackClientInvoker.getTimeout());
      log.info("timeout == 0");
     
      // Verify failing PingTimerTask kicks thread out of BisocketClientInvoker.createSocket().
      // 1. Get client side control socket.
      Set callbackConnectors = client.getCallbackConnectors(callbackHandler);
View Full Code Here

         // indicating the target remoting server to call upon.
         InvokerLocator locator = new InvokerLocator(locatorURI);

         client = new Client(locator);
         client.connect();
         SocketClientInvoker invoker = (SocketClientInvoker) client.getInvoker();
       
         // No sockets are in use.
//         assertEquals(0, invoker.usedPooled);
//         log.info("usedPool: " + invoker.usedPooled);
         assertEquals(0, invoker.getNumberOfUsedConnections());
  
         // Make SocketPoolTestServer.NUMBER_OF_CALLS invocations.
         for (int i = 0; i < SocketPoolTestServer.NUMBER_OF_CALLS; i++)
         {
            new Invoker(client, i).start();
         }
        
         Thread.sleep(500);
        
         // SocketPoolTestServer.NUMBER_OF_CALLS sockets are in use.
//         log.info("usedPool: " + invoker.usedPooled);
//         assertEquals(SocketPoolTestServer.NUMBER_OF_CALLS, invoker.usedPooled);
         log.info("usedPool: " + invoker.getNumberOfUsedConnections());
         assertEquals(SocketPoolTestServer.NUMBER_OF_CALLS, invoker.getNumberOfUsedConnections());
        
        
         Thread.sleep(5000);
        
         // All invocations have timed out.  All sockets should be closed and discarded.
//         log.info("usedPool: " + invoker.usedPooled);
//         assertEquals(0, invoker.usedPooled);
         log.info("usedPool: " + invoker.getNumberOfUsedConnections());
         assertEquals(0, invoker.getNumberOfUsedConnections());
      }
      finally
      {
         if(client != null)
         {
View Full Code Here

      try
      {
         connector.start();
         client.connect();

         SocketClientInvoker invoker = (SocketClientInvoker)client.getInvoker();

         assertEquals(socketRetries, invoker.getNumberOfRetries());
         assertEquals(callRetries, invoker.getNumberOfCallRetries());
         assertEquals(timeout, invoker.getTimeout());
         assertEquals(Boolean.FALSE.booleanValue(), invoker.checkingConnection());
      }
      finally
      {
         client.disconnect();
         connector.stop();
View Full Code Here

   public void testUniqueLeaseTimerTask() throws Throwable
   {
      log.info("entering " + getName());
     
      InvokerLocator locator = new InvokerLocator("socket://localhost:8888");
      SocketClientInvoker clientInvoker = new SocketClientInvoker(locator);
      LeasePinger leasePinger = new LeasePinger(clientInvoker, "abc", 2000);
      log.info("expect WARN \"failed to ping to server\"");
      leasePinger.addClient("def", null, 1000);
     
      // Verify LeasePingerTimerTask has not been created.
View Full Code Here

         // indicating the target remoting server to call upon.
         InvokerLocator locator = new InvokerLocator(locatorURI);

         client = new Client(locator);
         client.connect();
         SocketClientInvoker invoker = (SocketClientInvoker) client.getInvoker();
       
         // No sockets are in use.
         assertEquals(0, invoker.usedPooled);
         log.info("usedPool: " + invoker.usedPooled);
  
View Full Code Here

TOP

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

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.