Package org.jboss.remoting

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


     
      // Test connections.
      HashMap metadata = new HashMap();
      metadata.put(Client.RAW, "true");
      String message = "abcdefghijklmnopqrstuvwxyz";
      assertEquals(message, client.invoke(message, metadata));
      log.info("connection is good");
      assertTrue(invocationHandler.isChunked);
      log.info("invocation was sent chunked");
     
      client.disconnect();
View Full Code Here


      Client client = new Client(serverLocator, clientConfig);
      client.connect();
      log.info("client is connected");
     
      // Test connection.
      assertEquals("abc", client.invoke("abc"));
     
      // Add connection listener.
      Map metadata = new HashMap();
      metadata.put(ServerInvoker.TIMEOUT, ConnectionValidator.DEFAULT_PING_TIMEOUT + "1");
      ConnectionListener listener = new TestConnectionListener();
View Full Code Here

      Client client = new Client(locator, clientConfig);
      client.connect();
      TestCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, null, null, true);
     
      Object response = client.invoke(INVOKE);
      assertEquals(INVOKE, response);
      log.info("invocation succeeded");

      client.invoke(CALLBACK);
      assertTrue(callbackHandler.receivedCallback);
View Full Code Here

     
      Object response = client.invoke(INVOKE);
      assertEquals(INVOKE, response);
      log.info("invocation succeeded");

      client.invoke(CALLBACK);
      assertTrue(callbackHandler.receivedCallback);
      log.info("received first callback");
     
      Thread.sleep(ServerInvoker.DEFAULT_TIMEOUT_PERIOD + 5000);
View Full Code Here

      log.info("received first callback");
     
      Thread.sleep(ServerInvoker.DEFAULT_TIMEOUT_PERIOD + 5000);

      callbackHandler.receivedCallback = false;
      client.invoke(CALLBACK);
      assertTrue(callbackHandler.receivedCallback);
      log.info("received second callback");
     
      client.disconnect();
      connector.stop();
View Full Code Here

      Client client = new Client(locator, clientConfig);
      client.connect();
      TestCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, null, null, true);
     
      Object response = client.invoke(INVOKE);
      assertEquals(INVOKE, response);
      log.info("invocation succeeded");

      client.invoke(CALLBACK_ONEWAY);
      Thread.sleep(1000);
View Full Code Here

     
      Object response = client.invoke(INVOKE);
      assertEquals(INVOKE, response);
      log.info("invocation succeeded");

      client.invoke(CALLBACK_ONEWAY);
      Thread.sleep(1000);
      assertTrue(callbackHandler.receivedCallback);
      log.info("received first callback");
     
      Thread.sleep(ServerInvoker.DEFAULT_TIMEOUT_PERIOD + 5000);
View Full Code Here

     
      Thread.sleep(ServerInvoker.DEFAULT_TIMEOUT_PERIOD + 5000);

      log.info("waking up");
      callbackHandler.receivedCallback = false;
      client.invoke(CALLBACK_ONEWAY);
      log.info("sent second invocation");
      Thread.sleep(1000);
      assertTrue(callbackHandler.receivedCallback);
      log.info("received second callback");
     
View Full Code Here

      log.info("client added callback handler");
     
      Integer count = new Integer(17);
      HashMap metadata = new HashMap();
      metadata.put(COUNTER, count);
      Integer response = (Integer) client.invoke(INVOCATION_TEST, metadata);
      assertEquals(17, response.intValue());
     
      // Test server invoker configuration.
      // Actually, none of these parameters are used by the server invoker.
     
View Full Code Here

      log.info("client added callback handler");
     
      Integer count = new Integer(17);
      HashMap metadata = new HashMap();
      metadata.put(COUNTER, count);
      Integer response = (Integer) client.invoke(INVOCATION_TEST, metadata);
      assertEquals(17, response.intValue());
     
      // Test server invoker configuration.
      // Actually, none of these parameters are used by the server invoker.
        
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.