Package org.jboss.remoting

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


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


      clientConfig.put(Bisocket.MAX_RETRIES, TEST_MAX_RETRIES_STRING);
      clientConfig.put(Bisocket.MAX_CONTROL_CONNECTION_RESTARTS, TEST_CONTROL_CONNECTION_RESTARTS_STRING);

      addExtraClientConfig(clientConfig);
      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");
View Full Code Here

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

      log.info("Connecting to: " + serverLocator);
      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraClientConfig(config);
      Client client = new Client(serverLocator, config);
      client.connect();
      log.info("client is connected");
      assertTrue(client.getInvoker() instanceof BisocketClientInvoker);
     
      int invocationCount = 1000;
      HashMap metadata = new HashMap(1);
View Full Code Here

      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      config.put(Bisocket.IS_CALLBACK_SERVER, "true");
      addExtraClientConfig(config);
      Client client = new Client(serverLocator, config);
      client.connect();
      log.info("client is connected");
      assertTrue(client.getInvoker() instanceof BisocketClientInvoker);
     
      int invocationCount = 100;
      HashMap metadata = new HashMap(1);
View Full Code Here

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

      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      config.put(Bisocket.IS_CALLBACK_SERVER, "true");
      addExtraClientConfig(config);
      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());
View Full Code Here

      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      config.put(Bisocket.IS_CALLBACK_SERVER, "true");
      addExtraClientConfig(config);
      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);
View Full Code Here

      HashMap config = new HashMap();
      config.put(InvokerLocator.FORCE_REMOTE, "true");
      config.put(Bisocket.IS_CALLBACK_SERVER, "true");
      addExtraClientConfig(config);
      Client client = new Client(serverLocator, config);
      client.connect();
      log.info("client is connected");
      assertTrue(client.getInvoker() instanceof BisocketClientInvoker);
     
      DelayedCallbackHandler callbackHandler = new DelayedCallbackHandler(4000);
      client.addListener(callbackHandler, new HashMap());
View Full Code Here

      Client client = new Client(clientLocator, clientConfig);
     
      // Verify that Client.connect() throws Exception if LeasePinger.addClient() fails.
      try
      {
         client.connect();
         fail("expected exception");
      }
      catch (CannotConnectException e)
      {
         log.info("got exception", e);
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.