Package org.jboss.remoting

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


      log.info("connection is good");
     
      // Do callback.
      // Configure callbacks.
      TestCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
     
      // Do tests.
      assertTrue(ConfigTestMarshaller.ok(false, 2));
      assertTrue(ConfigTestUnmarshaller.ok(false, 0));
      assertTrue(LocatorTestMarshaller.ok());
View Full Code Here


      log.info("making first invocation");
      Object response = client.invoke("test");
      assertEquals("test", response);
      log.info("first invocation succeeds");
      final InvokerCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, new HashMap(), null, true);
     
      final Holder removeListener = new Holder();
      new Thread()
      {
         public void run()
View Full Code Here

      log.info("connection is good");
     
      // Do callback.
      // Configure callbacks.
      TestCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
     
      // Do tests.
      assertTrue(ConfigTestMarshaller.ok(true, 8));
      assertTrue(ConfigTestUnmarshaller.ok(true, 4));
      assertTrue(LocatorTestMarshaller.ok());
View Full Code Here

      log.info("making first invocation");
      Object response = client.invoke("test");
      assertEquals("test", response);
      log.info("first invocation succeeds");
      final InvokerCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, new HashMap(), null, true);
     
      final Holder removeListener = new Holder();
      new Thread()
      {
         public void run()
View Full Code Here

      log.info("making first invocation");
      Object response = client.invoke("test");
      assertEquals("test", response);
     
      final InvokerCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, new HashMap(), null, true);
     
      final Holder removeListener = new Holder();
      new Thread()
      {
         public void run()
View Full Code Here

      client.connect();

      InvokerCallbackHandler callbackHandler1 = new InvokerCallbackHandlerImpl("ONE");
      InvokerCallbackHandler callbackHandler2 = new InvokerCallbackHandlerImpl("TWO");

      client.addListener(callbackHandler1, callbackServerLocator);

      client.invoke("call back " + value1);

      assertEquals(1, callbacks.size());
      callbacks.clear();
View Full Code Here

      client.invoke("call back " + value1);

      assertEquals(1, callbacks.size());
      callbacks.clear();

      client.addListener(callbackHandler2, callbackServerLocator);

      client.invoke("call back " + value2);

      assertEquals(2, callbacks.size());
      callbacks.clear();
View Full Code Here

      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraClientConfig(clientConfig);
      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");
View Full Code Here

      clientConfig.put(SocketClientInvoker.SO_TIMEOUT_FLAG, "1000");
      addExtraClientConfig(clientConfig);
      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");
View Full Code Here

      Client client = new Client(serverLocator, clientConfig);
      client.connect();
      log.info("client is connected");
     
      SimpleCallbackHandler callbackHandler = new SimpleCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
      log.info("client added callback handler");
     
      Integer count = new Integer(17);
      HashMap metadata = new HashMap();
      metadata.put(COUNTER, count);
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.