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 (ServerInvokerCallbackHandler o: handlers)
      {
         log.debug("Updating CF on callback " + o);
         o.handleCallbackOneway(callback);
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

      // 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

         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

               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

         System.out.println("command: " + command);

         for (Iterator it = callbackHandlers.iterator(); it.hasNext(); )
         {
            InvokerCallbackHandler callbackHandler = (InvokerCallbackHandler) it.next();
            Callback cb1 = new Callback(command + "1");
            HashMap returnPayload1 = new HashMap();
            returnPayload1.put(ServerInvokerCallbackHandler.CALLBACK_ID, command + "1");
            returnPayload1.put(ServerInvokerCallbackHandler.CALLBACK_LISTENER, this);
            cb1.setReturnPayload(returnPayload1);
            if (REMOTING_ACKNOWLEDGEMENT_TEST.equals(command))
            {
               returnPayload1.put(ServerInvokerCallbackHandler.REMOTING_ACKNOWLEDGES_PUSH_CALLBACKS, "true");
            }
            else
            {
               returnPayload1.put(APPLICATION_ACKNOWLEDGEMENT_TEST, "true");
            }
            callbackHandler.handleCallback(cb1);

            Callback cb2 = new Callback(command + "2");
            HashMap returnPayload2 = new HashMap();
            returnPayload2.put(ServerInvokerCallbackHandler.CALLBACK_ID, command + "2");
            returnPayload2.put(ServerInvokerCallbackHandler.CALLBACK_LISTENER, this);
            cb2.setReturnPayload(returnPayload2);
            if (REMOTING_ACKNOWLEDGEMENT_TEST.equals(command))
            {
               returnPayload2.put(ServerInvokerCallbackHandler.REMOTING_ACKNOWLEDGES_PUSH_CALLBACKS, "true");
            }
            else
View Full Code Here

               String payload = t.getPayload();
               long[] triggerTimes = t.getTriggerTimes();

               for(int i = 0; i < triggerTimes.length; i++)
               {
                  Callback callback = new Callback(payload + (i != 0 ? Integer.toString(i) : ""));

                  try
                  {
                     Thread.sleep(triggerTimes[i]);
                  }
View Full Code Here

         {
            responseList = new ArrayList(responses.size());
            responseIterator = responses.iterator();
         }

         Callback callback = null;
         Object response = null;
         String listenerId = null;

         for (int i = 0; i < callbacks.size(); i++)
         {
            callback = (Callback) idsIterator.next();

            if (responseIterator != null)
            {
               response = responseIterator.next();
            }

            Map returnPayload = callback.getReturnPayload();

            if (returnPayload != null)
            {
               Object callbackId = returnPayload.get(ServerInvokerCallbackHandler.CALLBACK_ID);
               if (callbackId != null)
View Full Code Here

         {
            responseList = new ArrayList(responses.size());
            responseIterator = responses.iterator();
         }

         Callback callback = null;
         Object response = null;
         String listenerId = null;

         for (int i = 0; i < callbacks.size(); i++)
         {
            callback = (Callback) idsIterator.next();

            if (responseIterator != null)
            {
               response = responseIterator.next();
            }

            Map returnPayload = callback.getReturnPayload();

            if (returnPayload != null)
            {
               Object callbackId = returnPayload.get(ServerInvokerCallbackHandler.CALLBACK_ID);
               if (callbackId != null)
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.