Package org.jboss.remoting

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


               }
              
               // Set disconnectTimeout to 1 second.
               client.setDisconnectTimeout(shortTimeout());
               log.info("calling client.removeListener()");
               client.removeListener(callbackHandler);
               removeListener.done = true;
               log.info("returned from client.removeListener()");
            }
            catch (Throwable e)
            {
View Full Code Here


               {
                  log.info("client.invoke(\"test\") failed (that's OK)");
               }
              
               log.info("calling client.removeListener()");
               client.removeListener(callbackHandler);
               removeListener.done = true;
               log.info("returned from client.removeListener()");
            }
            catch (Throwable e)
            {
View Full Code Here

      InvokerCallbackHandler callbackHandler1 = new InvokerCallbackHandlerImpl("ONE");

      client.addListener(callbackHandler1, callbackServerLocator);

      client.removeListener(callbackHandler1);

      try
      {
         client.removeListener(callbackHandler1);
         assertTrue("Should throw an exception if remove a callback handler that has already been removed.", false);
View Full Code Here

      client.removeListener(callbackHandler1);

      try
      {
         client.removeListener(callbackHandler1);
         assertTrue("Should throw an exception if remove a callback handler that has already been removed.", false);
      }
      catch(Throwable t)
      {
         assertTrue("Got exception from server as expected.", true);
View Full Code Here

      finally
      {
         if(client != null)
         {
            // remove callback handler from server
            client.removeListener(callbackHandler1);
            client.removeListener(callbackHandler2);
            client.disconnect();
         }
         teardownServer(connector);
      }
View Full Code Here

      {
         if(client != null)
         {
            // remove callback handler from server
            client.removeListener(callbackHandler1);
            client.removeListener(callbackHandler2);
            client.disconnect();
         }
         teardownServer(connector);
      }
   }
View Full Code Here

      long start = System.currentTimeMillis();
      for (int i = 0; i < LOOPS; i++)
      {
         client.invoke("test");
         client.addListener(callbackHandler, new HashMap(), null, true);
         client.removeListener(callbackHandler);
         assertEquals(i+1, callbackHandler.counter);
         if ((i+1) % 100 == 0)
            log.info("connections: " + (i+1));
      }
      long finish = System.currentTimeMillis();
View Full Code Here

      finally
      {
         if(client != null)
         {
            // remove callback handler from server
            client.removeListener(callbackHandler);
            client.disconnect();
         }
         teardownServer(connector1);
         teardownServer(connector2);
      }
View Full Code Here

      client.invoke("call back " + value2);

      assertEquals(2, callbacks.size());
      callbacks.clear();

      client.removeListener(callbackHandler1);

      client.invoke("call back " + value3);

      assertEquals(1, callbacks.size());
      callbacks.clear();
View Full Code Here

      client.invoke("call back " + value3);

      assertEquals(1, callbacks.size());
      callbacks.clear();

      client.removeListener(callbackHandler2);

      connector.stop();
      callbackConnector.stop();

      connector.destroy();
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.