Package org.jboss.remoting.callback

Examples of org.jboss.remoting.callback.Callback


      // We send the message to the client on the current thread. The message is written onto the
      // transport and then the thread returns immediately without waiting for a response.

      ClientDelivery del = new ClientDelivery(ref.getMessage(), consumer.getID(), deliveryID, ref.getDeliveryCount());

      Callback callback = new Callback(del);

      try
      {
         // one way invocation, no acknowledgment sent back by the client
         if (trace) { log.trace(this + " submitting message " + ref.getMessage() + " to the remoting layer to be sent asynchronously"); }
View Full Code Here


      log.debug("updateClusteredClients being called!!! clientFactoriesToUpdate.size = " + handlers.size());

      ConnectionFactoryUpdate message =
         new ConnectionFactoryUpdate(uniqueName, delegates, failoverMap);

      Callback callback = new Callback(message);

      for (InvokerCallbackHandler o: handlers)
      {
         log.debug("Updating CF on callback " + o);
         ((ServerInvokerCallbackHandler)o).handleCallbackOneway(callback);
View Full Code Here

               Iterator it = callbackHandlers.iterator();
               while (it.hasNext())
               {
                  InvokerCallbackHandler callbackHandler = (InvokerCallbackHandler) it.next();
                  log.info("sending callback: " + ++counter);
                  callbackHandler.handleCallback(new Callback("callback"));
               }
               log.info("sent callback");
            }
            catch (HandleCallbackException e)
            {
View Full Code Here

   {
      public void addListener(InvokerCallbackHandler callbackHandler)
      {
         try
         {
            callbackHandler.handleCallback(new Callback("callback"));
         }
         catch (HandleCallbackException e)
         {
            log.error("Error sending callback", e);
         }
View Full Code Here

            String arg = param.substring("call back".length()).trim();
            for(Iterator i = callbackHandlers.iterator(); i.hasNext();)
            {
               InvokerCallbackHandler callbackHandler = (InvokerCallbackHandler) i.next();
               System.out.println("sending callback to " + callbackHandler);
               callbackHandler.handleCallback(new Callback(arg));
            }
         }

         return null;
      }
View Full Code Here

         }
         else if (CALLBACK.equals(command))
         {
            try
            {
               callbackHandler.handleCallback(new Callback("callback"));
               return null;
            }
            catch (HandleCallbackException e)
            {
               log.error("error handling callback");
               throw e;
            }
         }
         else if (CALLBACK_ONEWAY.equals(command))
         {
            try
            {
               ServerInvokerCallbackHandler sich = (ServerInvokerCallbackHandler) callbackHandler;
               sich.handleCallbackOneway(new Callback("callback"), true);
               return null;
            }
            catch (HandleCallbackException e)
            {
               log.error("error handling callback");
View Full Code Here

         log.info("entering addListener()");
         this.callbackHandler = callbackHandler;
        
         try
         {
            Callback callback = new Callback(new Integer(1));
            callbackHandler.handleCallback(callback);
            log.info("sent first callback");
         }
         catch(Exception e)
         {
View Full Code Here

         log.info("sending callback with request for acknowledgement");
         HashMap returnPayload = new HashMap();
         returnPayload.put(ServerInvokerCallbackHandler.CALLBACK_LISTENER, this);
         returnPayload.put(ServerInvokerCallbackHandler.CALLBACK_ID, new GUID());
         returnPayload.put(ServerInvokerCallbackHandler.REMOTING_ACKNOWLEDGES_PUSH_CALLBACKS, "true");
         Callback callback = new Callback("callback");
         callback.setReturnPayload(returnPayload);
        
         try
         {
            callbackHandler.handleCallback(callback);
         }
View Full Code Here

               Iterator it = callbackHandlers.iterator();
               while (it.hasNext())
               {
                  InvokerCallbackHandler callbackHandler = (InvokerCallbackHandler) it.next();
                  log.info("sending callback: " + ++counter);
                  callbackHandler.handleCallback(new Callback("callback"));
               }
               log.info("sent callback");
            }
            catch (HandleCallbackException e)
            {
View Full Code Here

         if(callbackContainer != null && callbackContainer.getCallbackHandler() != null)
         {
            Object[] params = param.getParameters();
           
            Callback callbackRequest = (Callback) params[0];
                                   
            Object obj = callbackContainer.getCallbackHandleObject();
           
            if (obj != null)
            {
               Map callbackHandleObject = callbackRequest.getReturnPayload();
              
               if(callbackHandleObject == null)
               {
                  callbackHandleObject = new HashMap();
               }
                             
               //We only want to add it if it is not null otherwise is a redundant operation
               callbackHandleObject.put(Callback.CALLBACK_HANDLE_OBJECT_KEY,
                                        obj);
              
               callbackRequest.setReturnPayload(callbackHandleObject);
            }
           
            InvokerCallbackHandler callbackHandler = callbackContainer.getCallbackHandler();
           
            callbackHandler.handleCallback(callbackRequest);
View Full Code Here

TOP

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

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.