Package org.jboss.remoting

Examples of org.jboss.remoting.MicroRemoteClientInvoker


      // Test connection.
      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      // Test lease behavior.
      MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
      clientInvoker.terminateLease(client.getSessionId(), 0);
      TestLeasePinger leasePinger = new TestLeasePinger(clientInvoker, clientInvoker.getSessionId(), LEASE_PERIOD);
      leasePinger.setLeasePingerId(new GUID().toString());
      leasePinger.addClient(client.getSessionId(), client.getConfiguration(), LEASE_PERIOD);
      leasePinger.startPing();
      Thread.sleep(LEASE_PERIOD * 4);
      assertFalse(listener.called);
View Full Code Here


      // Test connection.
      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      // Test lease behavior.
      MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
      clientInvoker.terminateLease(client.getSessionId(), 0);
      TestLeasePinger leasePinger = new TestLeasePinger(clientInvoker, clientInvoker.getSessionId(), LEASE_PERIOD);
      leasePinger.setLeasePingerId(new GUID().toString());
      leasePinger.addClient(client.getSessionId(), client.getConfiguration(), LEASE_PERIOD);
      leasePinger.startPing();
      Thread.sleep(LEASE_PERIOD * 4);
      assertFalse(listener.called);
View Full Code Here

      // Test connection.
      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      // Test lease behavior.
      MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
      clientInvoker.terminateLease(client.getSessionId(), 0);
      TestLeasePinger leasePinger = new TestLeasePinger(clientInvoker, clientInvoker.getSessionId(), LEASE_PERIOD);
      leasePinger.setLeasePingerId(new GUID().toString());
      leasePinger.addClient(client.getSessionId(), client.getConfiguration(), LEASE_PERIOD);
      leasePinger.startPing();
      Thread.sleep(LEASE_PERIOD * 4);
      assertTrue(listener.called);
View Full Code Here

         public ClientInvoker getInvoker()
         {
            try
            {
               return new MicroRemoteClientInvoker(
                     new InvokerLocator("http://dummy:65535/dummy/")) {

                  public String getSessionId()
                  {
                     return "dummyId";
View Full Code Here

         public ClientInvoker getInvoker()
         {
            try
            {
               return new MicroRemoteClientInvoker(
                     new InvokerLocator("http://dummy:65535/dummy/")) {

                  public String getSessionId()
                  {
                     return "dummyId";
View Full Code Here

      addExtraClientConfig(clientConfig);
      Client client = new Client(clientLocator, clientConfig);
      client.connect();
     
      // Get LeasePinger.
      MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
      Field field = MicroRemoteClientInvoker.class.getDeclaredField("leasePinger");
      field.setAccessible(true);
      LeasePinger pinger = (LeasePinger) field.get(clientInvoker);
     
      // Prevent server from answering PINGs.
View Full Code Here

      addExtraClientConfig(clientConfig);
      Client client = new Client(clientLocator, clientConfig);
      client.connect();
     
      // Get LeasePinger.
      MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
      Field field = MicroRemoteClientInvoker.class.getDeclaredField("leasePinger");
      field.setAccessible(true);
      LeasePinger pinger = (LeasePinger) field.get(clientInvoker);
     
      // Prevent server from answering PINGs.
View Full Code Here

      // Test connection.
      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      // Test lease behavior.
      MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
      clientInvoker.terminateLease(client.getSessionId(), 0);
      TestLeasePinger leasePinger = new TestLeasePinger(clientInvoker, clientInvoker.getSessionId(), LEASE_PERIOD);
      leasePinger.setLeasePingerId(new GUID().toString());
      leasePinger.addClient(client.getSessionId(), client.getConfiguration(), LEASE_PERIOD);
      leasePinger.startPing();
      Thread.sleep(LEASE_PERIOD * 4);
      assertFalse(listener.called);
View Full Code Here

      // Test connection.
      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      // Test lease behavior.
      MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
      clientInvoker.terminateLease(client.getSessionId(), 0);
      TestLeasePinger leasePinger = new TestLeasePinger(clientInvoker, clientInvoker.getSessionId(), LEASE_PERIOD);
      leasePinger.setLeasePingerId(new GUID().toString());
      leasePinger.addClient(client.getSessionId(), client.getConfiguration(), LEASE_PERIOD);
      leasePinger.startPing();
      Thread.sleep(LEASE_PERIOD * 4);
      assertFalse(listener.called);
View Full Code Here

      // Test connection.
      assertEquals("abc", client.invoke("abc"));
      log.info("connection is good");
     
      // Test lease behavior.
      MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
      clientInvoker.terminateLease(client.getSessionId(), 0);
      TestLeasePinger leasePinger = new TestLeasePinger(clientInvoker, clientInvoker.getSessionId(), LEASE_PERIOD);
      leasePinger.setLeasePingerId(new GUID().toString());
      leasePinger.addClient(client.getSessionId(), client.getConfiguration(), LEASE_PERIOD);
      leasePinger.startPing();
      Thread.sleep(LEASE_PERIOD * 4);
      assertTrue(listener.called);
View Full Code Here

TOP

Related Classes of org.jboss.remoting.MicroRemoteClientInvoker

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.