Package org.jboss.remoting.callback

Examples of org.jboss.remoting.callback.CallbackPoller


         field = Client.class.getDeclaredField("callbackPollers");
         field.setAccessible(true);
         Map callbackPollers = (Map)field.get(client);
         assertEquals(1, callbackPollers.size());

         CallbackPoller callbackPoller = (CallbackPoller)callbackPollers.values().iterator().next();

         field = CallbackPoller.class.getDeclaredField("pollPeriod");
         field.setAccessible(true);
         Long pollPeriod = (Long)field.get(callbackPoller);
         assertEquals(ServiceContainer.HTTP_CONNECTOR_CALLBACK_POLL_PERIOD, pollPeriod.longValue());
View Full Code Here


            field = Client.class.getDeclaredField("callbackPollers");
            field.setAccessible(true);
            Map callbackPollers = (Map)field.get(client);
            assertEquals(1, callbackPollers.size());

            CallbackPoller callbackPoller =
               (CallbackPoller)callbackPollers.values().iterator().next();

            field = CallbackPoller.class.getDeclaredField("pollPeriod");
            field.setAccessible(true);
View Full Code Here

                  log.debug(callbackhandler + " already registered");
                  return;
               }
              
               //need to setup poller to get callbacks from the server
               CallbackPoller poller =
                  new CallbackPoller(this, callbackhandler, metadata, callbackHandlerObject);
               callbackPollers.put(callbackhandler, poller);
               addCallbackListener(callbackhandler, metadata, callbackLocator, callbackHandlerObject);
               poller.start();
            }
         }
         else
         {
            throw new NullPointerException("InvokerCallbackHandler to be added as " +
View Full Code Here

                     log.debug("unable to remove remote callback handler", e);
                  }
               }

               // clean up callback poller if one exists
               CallbackPoller callbackPoller = (CallbackPoller) callbackPollers.remove(callbackHandler);
               if (callbackPoller != null)
               {
                  callbackPoller.stop();
               }

               listeners.remove(callbackHandler);
            }
            else
View Full Code Here

      // Get necessary fields.
      Field field = Client.class.getDeclaredField("callbackPollers");
      field.setAccessible(true);
      Map callbackPollers = (Map) field.get(client);
      assertEquals(1, callbackPollers.size());
      CallbackPoller poller = (CallbackPoller) callbackPollers.values().iterator().next();
      field.setAccessible(true);
      Class[] classes = CallbackPoller.class.getDeclaredClasses();
      Class handleThreadClass = null;
      Class acknowledgeThreadClass = null;
      for (int i = 0; i < classes.length; i++)
View Full Code Here

      // Get necessary fields.
      Field field = Client.class.getDeclaredField("callbackPollers");
      field.setAccessible(true);
      Map callbackPollers = (Map) field.get(client);
      assertEquals(1, callbackPollers.size());
      CallbackPoller poller = (CallbackPoller) callbackPollers.values().iterator().next();
      field.setAccessible(true);
      Class[] classes = CallbackPoller.class.getDeclaredClasses();
      Class handleThreadClass = null;
      Class acknowledgeThreadClass = null;
      for (int i = 0; i < classes.length; i++)
View Full Code Here

   {
      Field field = Client.class.getDeclaredField("callbackPollers");
      field.setAccessible(true);
      Map pollers = (Map) field.get(client);
      assertEquals(1, pollers.size());
      CallbackPoller poller = (CallbackPoller) pollers.values().iterator().next();
      field = CallbackPoller.class.getDeclaredField("blocking");
      field.setAccessible(true);
      boolean blocking = ((Boolean)field.get(poller)).booleanValue();
      field = CallbackPoller.class.getDeclaredField("pollPeriod");
      field.setAccessible(true);
View Full Code Here

     
      // Add InvokerCallbackHandler first time.
      TestInvokerCallbackHandler callbackHandler = new TestInvokerCallbackHandler();
      client.addListener(callbackHandler, new HashMap());
      assertEquals(1, callbackPollers.size());
      CallbackPoller callbackPoller1 = (CallbackPoller) callbackPollers.values().iterator().next();
     
      // Add InvokerCallbackHandler second time.
      client.addListener(callbackHandler, new HashMap());
      assertEquals(1, callbackPollers.size());
      CallbackPoller callbackPoller2 = (CallbackPoller) callbackPollers.values().iterator().next();
      assertEquals(callbackPoller2, callbackPoller1);

      client.removeListener(callbackHandler);
      client.disconnect();
      connector.stop();
View Full Code Here

                  log.debug(callbackhandler + " already registered");
                  return;
               }
              
               //need to setup poller to get callbacks from the server
               CallbackPoller poller =
                  new CallbackPoller(this, callbackhandler, metadata, callbackHandlerObject);
               callbackPollers.put(callbackhandler, poller);
               addCallbackListener(callbackhandler, metadata, callbackLocator, callbackHandlerObject);
               poller.start();
            }
         }
         else
         {
            throw new NullPointerException("InvokerCallbackHandler to be added as " +
View Full Code Here

                     log.warn("unable to remove remote callback handler: " + e.getMessage());
                  }
               }

               // clean up callback poller if one exists
               CallbackPoller callbackPoller = (CallbackPoller) callbackPollers.remove(callbackHandler);
               if (callbackPoller != null)
               {
                  callbackPoller.stop();
               }

               listeners.remove(callbackHandler);
            }
            else
View Full Code Here

TOP

Related Classes of org.jboss.remoting.callback.CallbackPoller

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.