Package org.jboss.remoting

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


      field.setAccessible(true);
      Map controlConnectionThreadMap = (Map) field.get(callbackServerInvoker);
      assertEquals(0, controlConnectionThreadMap.size());
     
      client.setDisconnectTimeout(0);
      client.removeListener(callbackHandler);
      client.disconnect();
   }
  
  
   public void testForLeaks() throws Throwable
View Full Code Here


         assertNotNull(field.get(serverInvokers[j]));
      }
     
      for (int j = 0; j < CALLBACK_HANDLER_COUNT; j++)
      {
         client.removeListener(callbackHandlers[j]);
      }
     
      assertEquals(0, listenerIdToServerInvokerMap.size());
      assertEquals(0, listenerIdToClientInvokerMap.size());
      assertEquals(0, listenerIdToCallbackClientInvokerMap.size());
View Full Code Here

     
      client.setDisconnectTimeout(0);
     
      for (int j = 0; j < CALLBACK_HANDLER_COUNT; j++)
      {
         client.removeListener(callbackHandlers[j]);
      }
     
      assertEquals(0, listenerIdToServerInvokerMap.size());
      assertEquals(0, listenerIdToClientInvokerMap.size());
     
View Full Code Here

         metadata.put(COUNTER, count);
         Object response = client.invoke(INVOCATION_TEST, metadata);
         assertTrue(response.equals(count));
      }
     
      client.removeListener(callbackHandler);
      client.disconnect();
   }
  
  
   public void testAlternatingInvocationsAndCallbacks() throws Throwable
View Full Code Here

         client.invoke(CALLBACK_TEST);
         assertTrue(response.equals(count));
      }
     
      assertEquals(invocationCount, callbackHandler.callbackCounter);
      client.removeListener(callbackHandler);
      client.disconnect();
   }
  
  
   public void testPullCallbacks() throws Throwable
View Full Code Here

      Field field = BisocketClientInvoker.class.getDeclaredField("listenerIdToClientInvokerMap");
      field.setAccessible(true);
      Map listenerIdToClientInvokerMap = (Map) field.get(client.getInvoker());
      assertEquals(0, listenerIdToClientInvokerMap.size());
     
      client.removeListener(callbackHandler);
      client.disconnect();
   }
  
  
   public void testMaxSocketPoolSize() throws Throwable
View Full Code Here

      Thread.sleep(3000);

      //Thread.sleep(600000);

      client.removeListener(testCallbackHandler);
      client.disconnect();

      assertTrue(gotCallback);
   }
View Full Code Here

      System.out.println("Done waiting for callbacks, will shutdown callback server and client.");
      // shutdown client and callback server
//      callbackServer.getServerInvoker().removeInvocationHandler(
//            callbackServer.getServerInvoker().getInvocationHandlers()[0].toString()
//      );
      client.removeListener(callbackHandler);
      client.disconnect();
      callbackServer.stop();
      callbackServer.destroy();

      System.out.println("Callback total number after shutdown is " + callbackHandler.getCallbackNumber());
View Full Code Here

      client.addListener(testCallbackHandler, new HashMap(), "foobar");
      client.invoke("foobar");

      Thread.sleep(5000);

      client.removeListener(testCallbackHandler);
      client.disconnect();

      assertTrue(gotCallback);

   }
View Full Code Here

      client.addListener(testCallbackHandler, new HashMap(), "foobar");
      client.invoke("foobar");

      Thread.sleep(5000);

      client.removeListener(testCallbackHandler);
      client.disconnect();

      assertTrue(gotCallback);
   }
  
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.