Package nexj.core.rpc.queueing

Examples of nexj.core.rpc.queueing.DispatcherMessage


               }
               catch (Throwable t)
               {
                  if (pool.isStopped())
                  {
                     m_message = new DispatcherMessage()
                     {
                        public void respond(Object result)
                        {
                        }
View Full Code Here


   /**
    * @see nexj.core.rpc.ra.GenericConsumer#deliver(java.lang.Object)
    */
   protected void deliver(Object message) throws Throwable
   {
      DispatcherMessage msg = (DispatcherMessage)message;

      ((ObjectDispatchListener)m_endpoint).onMessage(msg);
   }
View Full Code Here

      {
         MessageResponse response = null;

         if (result instanceof DispatcherMessage)
         {
            DispatcherMessage resultMessage = (DispatcherMessage)result;

            response = new MessageResponse(new SerializableMessage(resultMessage));
         }
         else
         {
View Full Code Here

            synchronized (this)
            {
               m_bStarting = true;

               consumer.start(new DispatcherMessage()
               {
                  public void respond(Object result)
                  {
                     synchronized (DispatcherState.this)
                     {
View Full Code Here

               // don't need to dispatch again until another thread requests it.
               s_logger.debug("Invoking dispatch");

               // run the dispatcher
               consumer = (ObjectConsumer)getConsumer();
               consumer.start(new DispatcherMessage()
               {
                  public void respond(Object result)
                  {
                     if (result != null)
                     {
View Full Code Here

               ObjectConsumer consumer = null;

               try
               {
                  // get a message from the dispatcher (could block)
                  final DispatcherMessage message = getMessage();

                  // process the message from the dispatcher
                  if (message != null)
                  {
                     s_logger.debug("Receiving message");
                     consumer = (ObjectConsumer)getConsumer();
                     consumer.start(new DispatcherMessageDelegator()
                     {
                        public DispatcherMessage getMessage()
                        {
                           return message;
                        }

                        public void respond(Object result)
                        {
                           if (message.getType() == RECEIVE)
                           {
                              m_state.wake(new Long(System.currentTimeMillis()));
                           }
                        }
View Full Code Here

TOP

Related Classes of nexj.core.rpc.queueing.DispatcherMessage

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.