Package org.jboss.remoting

Examples of org.jboss.remoting.ConnectionListener


      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraClientConfig(clientConfig);
      Client client = new Client(serverLocator, clientConfig);
      client.connect();
      ConnectionListener listener = new TestConnectionListener();
      client.addConnectionListener(listener);
      log.info("client is connected");
     
      // Test connection.
      assertEquals("test", client.invoke("test"));
View Full Code Here


      connectorLease = new Connector(ClientLeasePeriodTestServer.locatorURILease);
      connectorLease.create();
      connectorLease.start();

      connectionListener = new ConnectionListener()
      {
         public void handleConnectionException(Throwable throwable, Client client)
         {
         }
      };
View Full Code Here

      connectorLease = new Connector(ClientLeasePeriodTestServer.locatorURILease);
      connectorLease.create();
      connectorLease.start();

      connectionListener = new ConnectionListener()
      {
         public void handleConnectionException(Throwable throwable, Client client)
         {
         }
      };
View Full Code Here

      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      addExtraClientConfig(clientConfig);
      Client client = new Client(serverLocator, clientConfig);
      client.connect();
      ConnectionListener listener = new TestConnectionListener();
      client.addConnectionListener(listener);
      log.info("client is connected");
     
      // Test connection.
      assertEquals("test", client.invoke("test"));
View Full Code Here

   {
      Client client = new Client(new InvokerLocator(ClientPingCountTestServer.locatorURI));

      client.connect();

      client.addConnectionListener(new ConnectionListener()
      {
         public void handleConnectionException(Throwable throwable, Client client) {}
      });

      assertEquals(ConnectionValidator.DEFAULT_PING_PERIOD, client.getPingPeriod());
View Full Code Here

   {
      Client client = new Client(new InvokerLocator(ClientPingCountTestServer.locatorURI));

      client.connect();

      client.addConnectionListener(new ConnectionListener()
      {
         public void handleConnectionException(Throwable throwable, Client client) {}
      }, 7865);

      assertEquals(7865, client.getPingPeriod());
View Full Code Here

     
      // Test connection.
      assertEquals("abc", client.invoke("abc"));
     
      // Add connection listener.
      ConnectionListener listener = new TestConnectionListener();
      client.addConnectionListener(listener);
     
      // Test pingPeriod.
      Field field = Client.class.getDeclaredField("connectionValidator");
      field.setAccessible(true);
View Full Code Here

     
      // Test connection.
      assertEquals("abc", client.invoke("abc"));
     
      // Add connection listener.
      ConnectionListener listener = new TestConnectionListener();
      client.addConnectionListener(listener, 3456);
     
      // Test pingPeriod.
      Field field = Client.class.getDeclaredField("connectionValidator");
      field.setAccessible(true);
View Full Code Here

      // Test connection.
      assertEquals("abc", client.invoke("abc"));
     
      // Add connection listener.
      Map metadata = new HashMap();
      ConnectionListener listener = new TestConnectionListener();
      client.addConnectionListener(listener, metadata);
     
      // Test pingPeriod.
      Field field = Client.class.getDeclaredField("connectionValidator");
      field.setAccessible(true);
View Full Code Here

      assertEquals("abc", client.invoke("abc"));
     
      // Add connection listener.
      Map metadata = new HashMap();
      metadata.put(ConnectionValidator.VALIDATOR_PING_PERIOD, "3467");
      ConnectionListener listener = new TestConnectionListener();
      client.addConnectionListener(listener, metadata);
     
      // Test pingPeriod.
      Field field = Client.class.getDeclaredField("connectionValidator");
      field.setAccessible(true);
View Full Code Here

TOP

Related Classes of org.jboss.remoting.ConnectionListener

Copyright © 2018 www.massapicom. 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.