Package org.jboss.remoting

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


      HashMap metadata = new HashMap(1);
      for (int i = 0; i < invocationCount; i++)
      {
         Integer count = new Integer(i);
         metadata.put(COUNTER, count);
         Object response = client.invoke(INVOCATION_TEST, metadata);
         response.equals(count);
      }
     
      client.disconnect();
   }
View Full Code Here


      HashMap metadata = new HashMap(1);
      for (int i = 0; i < invocationCount; i++)
      {
         Integer count = new Integer(i);
         metadata.put(COUNTER, count);
         Object response = client.invoke(INVOCATION_TEST, metadata);
         assertTrue(response.equals(count));
      }
     
      SimpleCallbackHandler callbackHandler = new SimpleCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
View Full Code Here

      client.addListener(callbackHandler, new HashMap());
      log.info("client added callback handler");
     
      for (int i = 0; i < invocationCount; i++)
      {
         client.invoke(CALLBACK_TEST);
      }
     
      assertEquals(invocationCount, callbackHandler.callbackCounter);
     
      for (int i = 0; i < invocationCount; i++)
View Full Code Here

     
      for (int i = 0; i < invocationCount; i++)
      {
         Integer count = new Integer(i);
         metadata.put(COUNTER, count);
         Object response = client.invoke(INVOCATION_TEST, metadata);
         assertTrue(response.equals(count));
      }
     
      client.removeListener(callbackHandler);
      client.disconnect();
View Full Code Here

      clientConfig.put(ServerInvoker.TIMEOUT, "20000");
      clientConfig.put(Client.ENABLE_LEASE, "true");
      addClientConfig(clientConfig);
      final Client client = new Client(locator, clientConfig);
      client.connect();
      Object response = client.invoke("test 1");
      assertEquals("test 1", response);
     
      class BooleanHolder {public boolean value;}
      final BooleanHolder timedOut = new BooleanHolder();
      timedOut.value = false;
View Full Code Here

            {
               // Wait for the server to be disabled.
               Thread.sleep(4000);
              
               // This invocation will cause the ServerThread to shut down.
               client.invoke("test 2");
               log.debug("calling client.disconnect()");
              
               // This invocation will require the creation of a new socket, which
               // should promptly time out.
               HashMap metadata = new HashMap();
View Full Code Here

              
               // This invocation will require the creation of a new socket, which
               // should promptly time out.
               HashMap metadata = new HashMap();
               metadata.put(ServerInvoker.TIMEOUT, "1000");
               client.invoke("test 3", metadata);
               fail("failed to time out");
            }
            catch (Throwable e)
            {
               timedOut.value = true;
View Full Code Here

      HashMap metadata = new HashMap(1);
      for (int i = 0; i < invocationCount; i++)
      {
         Integer count = new Integer(i);
         metadata.put(COUNTER, count);
         Object response = client.invoke(INVOCATION_TEST, metadata);
         client.invoke(CALLBACK_TEST);
         assertTrue(response.equals(count));
      }
     
      assertEquals(invocationCount, callbackHandler.callbackCounter);
View Full Code Here

      for (int i = 0; i < invocationCount; i++)
      {
         Integer count = new Integer(i);
         metadata.put(COUNTER, count);
         Object response = client.invoke(INVOCATION_TEST, metadata);
         client.invoke(CALLBACK_TEST);
         assertTrue(response.equals(count));
      }
     
      assertEquals(invocationCount, callbackHandler.callbackCounter);
      client.removeListener(callbackHandler);
View Full Code Here

      log.info("client added pull callback handler");
     
      HashMap metadata = new HashMap(1);
      Integer count = new Integer(3);
      metadata.put(COUNTER, count);
      Object response = client.invoke(INVOCATION_TEST, metadata);
      assertTrue(response.equals(count));
      client.invoke(CALLBACK_TEST);
      List callbacks = client.getCallbacks(callbackHandler);
      assertEquals(1, callbacks.size());
     
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.