Package org.jboss.remoting

Examples of org.jboss.remoting.Client.invoke()


      // Test invocations.
      assertEquals("abc", client.invoke("abc"));
      log.info("first invocation succeeded");
      assertEquals("lmn", client.invoke("lmn"));
      log.info("second invocation succeeded");
      assertEquals("xyz", client.invoke("xyz"));
      log.info("third invocation succeeded");
      assertEquals(1, TestServerThread.threadCounter);
     
      client.disconnect();
      shutdownServer();
View Full Code Here


      Client client = new Client(clientLocator, clientConfig);
      client.connect();
      log.info("client is connected");
     
      // Test invocations.
      assertEquals("abc", client.invoke("abc"));
      log.info("first invocation succeeded");
      assertEquals("lmn", client.invoke("lmn"));
      log.info("second invocation succeeded");
      assertEquals("xyz", client.invoke("xyz"));
      log.info("third invocation succeeded");
View Full Code Here

      log.info("client is connected");
     
      // Test invocations.
      assertEquals("abc", client.invoke("abc"));
      log.info("first invocation succeeded");
      assertEquals("lmn", client.invoke("lmn"));
      log.info("second invocation succeeded");
      assertEquals("xyz", client.invoke("xyz"));
      log.info("third invocation succeeded");
      assertEquals(1, TestServerThread.threadCounter);
     
View Full Code Here

      // Test invocations.
      assertEquals("abc", client.invoke("abc"));
      log.info("first invocation succeeded");
      assertEquals("lmn", client.invoke("lmn"));
      log.info("second invocation succeeded");
      assertEquals("xyz", client.invoke("xyz"));
      log.info("third invocation succeeded");
      assertEquals(1, TestServerThread.threadCounter);
     
      client.disconnect();
      shutdownServer();
View Full Code Here

         ConnectionFactoryCreateConnectionDelegateRequest req =
            new ConnectionFactoryCreateConnectionDelegateRequest(id, v,
                                                                 remotingSessionId, clientVMId,
                                                                 username, password, failedNodeID);
          
         ResponseSupport rs = (ResponseSupport)client.invoke(req, null);
        
         res = (CreateConnectionResult)rs.getResponse();
      }
      catch (Throwable t)
      {
View Full Code Here

         ConnectionFactoryCreateConnectionDelegateRequest req =
            new ConnectionFactoryCreateConnectionDelegateRequest(id, v,
                                                                 remotingSessionId, clientVMId,
                                                                 username, password, failedNodeID);
          
         ResponseSupport rs = (ResponseSupport)client.invoke(req, null);
        
         res = (CreateConnectionResult)rs.getResponse();
      }
      catch (Throwable t)
      {
View Full Code Here

      log.info("client is connected");
      assertTrue(client.getInvoker() instanceof BisocketClientInvoker);
      DelayedCallbackHandler callbackHandler = new DelayedCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
      log.info("client added callback handler");
      client.invoke(CALLBACK_TEST);
      client.invoke(CALLBACK_TEST);
      client.invoke(CALLBACK_TEST);
     
      Thread.sleep(500);
      assertEquals(3, callbackHandler.callbackCounter);
View Full Code Here

      assertTrue(client.getInvoker() instanceof BisocketClientInvoker);
      DelayedCallbackHandler callbackHandler = new DelayedCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
      log.info("client added callback handler");
      client.invoke(CALLBACK_TEST);
      client.invoke(CALLBACK_TEST);
      client.invoke(CALLBACK_TEST);
     
      Thread.sleep(500);
      assertEquals(3, callbackHandler.callbackCounter);
     
View Full Code Here

      Client client = new Client(clientLocator, clientConfig);
      client.connect();
      log.info("client is connected");
     
      // 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());
View Full Code Here

      DelayedCallbackHandler callbackHandler = new DelayedCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
      log.info("client added callback handler");
      client.invoke(CALLBACK_TEST);
      client.invoke(CALLBACK_TEST);
      client.invoke(CALLBACK_TEST);
     
      Thread.sleep(500);
      assertEquals(3, callbackHandler.callbackCounter);
     
      Field field = Client.class.getDeclaredField("callbackConnectors");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.