Package org.jboss.remoting

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


      Thread.sleep(TEST_PING_FREQUENCY * 5);
     
      // It is beyond the scope of Remoting to fail over to a new server,
      // complete with registered callback handlers.
      log.info("adding callback handler");
      client.addListener(callbackHandler, new HashMap());
      log.info("client added callback handler");
     
      client.invoke(CALLBACK_TEST);
      assertEquals(2, callbackHandler.callbackCounter);

View Full Code Here


      Client client = new Client(serverLocator, config);
      client.connect();
      log.info("client is connected");
      assertTrue(client.getInvoker() instanceof BisocketClientInvoker);
      SimpleCallbackHandler callbackHandler = new SimpleCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
      log.info("client added callback handler");
      client.invoke(CALLBACK_TEST);
      assertEquals(1, callbackHandler.callbackCounter);
     
      Connector oldConnector = connector;
View Full Code Here

      assertNotSame(connector, oldConnector);
     
      // It is beyond the scope of Remoting to fail over to a new server,
      // complete with registered callback handlers.
      log.info("adding callback handler");
      client.addListener(callbackHandler, new HashMap());
      log.info("client added callback handler");
     
      client.invoke(CALLBACK_TEST);
      assertEquals(2, callbackHandler.callbackCounter);
View Full Code Here

      String callbackLocatorURI = getTransport() + "://" + host + ":1";
      config.put(Bisocket.IS_CALLBACK_SERVER, "true");
      Connector callbackConnector = new Connector(callbackLocatorURI, config);
      callbackConnector.start();
      SimpleCallbackHandler callbackHandler = new SimpleCallbackHandler();
      client.addListener(callbackHandler, new InvokerLocator(callbackLocatorURI));
      log.info("client added callback handler");
      client.invoke(CALLBACK_TEST);
      assertEquals(1, callbackHandler.callbackCounter);
     
      SocketServerInvoker invoker = (SocketServerInvoker) connector.getServerInvoker();
View Full Code Here

      int CALLBACK_HANDLER_COUNT = 5;
      SimpleCallbackHandler[] callbackHandlers = new SimpleCallbackHandler[CALLBACK_HANDLER_COUNT];
      for (int i = 0; i < CALLBACK_HANDLER_COUNT; i++)
      {
         callbackHandlers[i] = new SimpleCallbackHandler();
         client.addListener(callbackHandlers[i], new HashMap());
      }

      client.invoke(CALLBACK_TEST);
      for (int i = 0; i < CALLBACK_HANDLER_COUNT; i++)
      {
View Full Code Here

      int CALLBACK_HANDLER_COUNT = 5;
      SimpleCallbackHandler[] callbackHandlers = new SimpleCallbackHandler[CALLBACK_HANDLER_COUNT];
      for (int i = 0; i < CALLBACK_HANDLER_COUNT; i++)
      {
         callbackHandlers[i] = new SimpleCallbackHandler();
         client.addListener(callbackHandlers[i], new HashMap());
      }

      client.invoke(CALLBACK_TEST);
      for (int i = 0; i < CALLBACK_HANDLER_COUNT; i++)
      {
View Full Code Here

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

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

      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      // Configure callbacks.
      TestCallbackHandler callbackHandler = new TestCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
     
      // Do tests.
      assertTrue(ConfigTestMarshaller.ok(true, 16));
      assertTrue(ConfigTestUnmarshaller.ok(true, 8));
      assertTrue(LocatorTestMarshaller.ok());
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(false, 2));
      assertTrue(ConfigTestUnmarshaller.ok(false, 0));
      assertTrue(LocatorTestMarshaller.ok());
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.