Package org.jboss.test.thirdparty.remoting.util

Examples of org.jboss.test.thirdparty.remoting.util.SimpleConnectionListener


      Client client = new Client(serverLocator);

      client.connect();

      SimpleConnectionListener connListener = new SimpleConnectionListener();
      client.addConnectionListener(connListener, 50);

      assertEquals(50, client.getPingPeriod());

      // let it ping for a while
View Full Code Here


      {
         client = new Client(serverLocator, RemotingTestSubsystemService.SUBSYSTEM_LABEL);

         client.connect();

         SimpleConnectionListener connListener = new SimpleConnectionListener();
         client.addConnectionListener(connListener, 3333);

         log.info("connection listener added, pinging will start in 3.3 secs");

         Thread.sleep(5000);
View Full Code Here

            }
         }, "Lazy Invocation Thread").start();

         Thread.sleep(1000);

         SimpleConnectionListener connListener = new SimpleConnectionListener();
         client.addConnectionListener(connListener, 3333);

         log.info("connection listener added, pinging will start in 3.3 secs");

         Thread.sleep(4000);
View Full Code Here

      Client client = new Client(serverLocator, RemotingTestSubsystemService.SUBSYSTEM_LABEL);

      client.connect();

      SimpleConnectionListener connListener = new SimpleConnectionListener();
      client.addConnectionListener(connListener);

      ServerManagement.kill(0);

      long pingPeriod = client.getPingPeriod();

      // wait for the failure to be detected

      Throwable failure = connListener.getNextFailure(2 * pingPeriod);
      assertNotNull(failure);

      // the client is in a "broken" state, an invocation on it should fail

      try
View Full Code Here

      }

      // add a dummy server-side ConnectionListener, to enable leasing on server

      ServerManagement.invoke(ServiceContainer.REMOTING_OBJECT_NAME, "addConnectionListener",
                              new Object[] { new SimpleConnectionListener() },
                              new String[] {"org.jboss.remoting.ConnectionListener"});


      // enable leasing on client
      Map conf = new HashMap();
View Full Code Here

      }

      // add a dummy server-side ConnectionListener, to enable leasing on server

      ServerManagement.invoke(ServiceContainer.REMOTING_OBJECT_NAME, "addConnectionListener",
                              new Object[] { new SimpleConnectionListener() },
                              new String[] {"org.jboss.remoting.ConnectionListener"});


      // enable leasing on client
      Map conf = new HashMap();
      conf.put(Client.ENABLE_LEASE, Boolean.TRUE);
      conf.put(InvokerLocator.CLIENT_LEASE_PERIOD, "999");

      Client client = new Client(serverLocator, RemotingTestSubsystemService.SUBSYSTEM_LABEL, conf);

      client.connect();

      SimpleConnectionListener connListener = new SimpleConnectionListener();
      client.addConnectionListener(connListener);

      ServerManagement.kill(0);

      // wait until failure is detected

      Throwable failure = connListener.getNextFailure(3000);
      assertNotNull(failure);

      // we simulate what Messaging is doing and we

      client.setDisconnectTimeout(0);
View Full Code Here

      {
         client = new Client(serverLocator, RemotingTestSubsystemService.SUBSYSTEM_LABEL);

         client.connect();

         SimpleConnectionListener connListener = new SimpleConnectionListener();
         client.addConnectionListener(connListener, 3333);

         log.info("connection listener added, pinging will start in 3.3 secs");

         Thread.sleep(5000);
View Full Code Here

            }
         }, "Lazy Invocation Thread").start();

         Thread.sleep(1000);

         SimpleConnectionListener connListener = new SimpleConnectionListener();
         client.addConnectionListener(connListener, 3333);

         log.info("connection listener added, pinging will start in 3.3 secs");

         Thread.sleep(4000);
View Full Code Here

      Client client = new Client(serverLocator, RemotingTestSubsystemService.SUBSYSTEM_LABEL);

      client.connect();

      SimpleConnectionListener connListener = new SimpleConnectionListener();
      client.addConnectionListener(connListener);

      ServerManagement.kill(0);

      long pingPeriod = client.getPingPeriod();

      // wait for the failure to be detected

      Throwable failure = connListener.getNextFailure(2 * pingPeriod);
      assertNotNull(failure);

      // the client is in a "broken" state, an invocation on it should fail

      try
View Full Code Here

      }

      // add a dummy server-side ConnectionListener, to enable leasing on server

      ServerManagement.invoke(ServiceContainer.REMOTING_OBJECT_NAME, "addConnectionListener",
                              new Object[] { new SimpleConnectionListener() },
                              new String[] {"org.jboss.remoting.ConnectionListener"});


      // enable leasing on client
      Map conf = new HashMap();
View Full Code Here

TOP

Related Classes of org.jboss.test.thirdparty.remoting.util.SimpleConnectionListener

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.