Package org.jboss.jms.client.container

Examples of org.jboss.jms.client.container.ClientConsumer


      if (parameter instanceof ClientDelivery)
      {
         ClientDelivery dr = (ClientDelivery)parameter;
         
         ClientConsumer handler =
            (ClientConsumer)callbackHandlers.get(dr.getConsumerId());

         if (handler == null)
         {
            // This should never happen since we wait for all deliveries to arrive before closing
            // the consumer

            throw new IllegalStateException(this + " callback handler not found, message arrived after consumer is closed.");
         }

         try
         {
            handler.handleMessage(dr, this);
         }
         catch (Exception e)
         {
            log.error("Failed to handle message", e);
            throw new HandleCallbackException(e.getMessage(), e);
View Full Code Here


      CallbackManager newCallbackManager = ((ClientConnectionDelegate)ns.getParent().getParent().
         getDelegate()).getRemotingConnection().getCallbackManager();

      // We need to synchronize the old message callback handler using the new one

      ClientConsumer handler = oldCallbackManager.unregisterHandler(oldConsumerID);
      ClientConsumer newHandler = newCallbackManager.unregisterHandler(consumerID);
  
      handler.synchronizeWith(newHandler);
      newCallbackManager.registerHandler(consumerID, handler);
   }
View Full Code Here

      CallbackManager newCallbackManager = ((ClientConnectionDelegate)ns.getParent().getParent().
         getDelegate()).getRemotingConnection().getCallbackManager();

      // We need to synchronize the old message callback handler using the new one

      ClientConsumer handler = oldCallbackManager.unregisterHandler(oldConsumerID);
      ClientConsumer newHandler = newCallbackManager.unregisterHandler(consumerID);
  
      handler.synchronizeWith(newHandler);
      newCallbackManager.registerHandler(consumerID, handler);
   }
View Full Code Here

      if (parameter instanceof ClientDelivery)
      {
         ClientDelivery dr = (ClientDelivery)parameter;
         
         ClientConsumer handler =
            (ClientConsumer)callbackHandlers.get(dr.getConsumerId());

         if (handler == null)
         {
            // This should never happen since we wait for all deliveries to arrive before closing
            // the consumer

            throw new IllegalStateException(this + " callback handler not found, message arrived after consumer is closed.");
         }

         try
         {
            handler.handleMessage(dr);
         }
         catch (Exception e)
         {
            log.error("Failed to handle message", e);
            throw new HandleCallbackException(e.getMessage(), e);
View Full Code Here

      CallbackManager newCallbackManager = ((ClientConnectionDelegate)ns.getParent().getParent().
         getDelegate()).getRemotingConnection().getCallbackManager();

      // We need to synchronize the old message callback handler using the new one

      ClientConsumer handler = oldCallbackManager.unregisterHandler(oldConsumerID);
      ClientConsumer newHandler = newCallbackManager.unregisterHandler(consumerID);
  
      handler.synchronizeWith(newHandler);
      newCallbackManager.registerHandler(consumerID, handler);
   }
View Full Code Here

         Message msg = dr.getMessage();
        
         MessageProxy proxy = JBossMessage.
            createThinDelegate(dr.getDeliveryId(), (JBossMessage)msg, dr.getDeliveryCount());

         ClientConsumer handler =
            (ClientConsumer)callbackHandlers.get(dr.getConsumerId());

         if (handler == null)
         {
            // This should never happen since we wait for all deliveries to arrive before closing
            // the consumer

            throw new IllegalStateException(this + " callback handler not found, message arrived after consumer is closed.");
         }

         try
         {
            handler.handleMessage(proxy);
         }
         catch (Exception e)
         {
            log.error("Failed to handle message", e);
            throw new HandleCallbackException(e.getMessage(), e);
View Full Code Here

/*     */
/*  87 */       Message msg = dr.getMessage();
/*     */
/*  89 */       MessageProxy proxy = JBossMessage.createThinDelegate(dr.getDeliveryId(), (JBossMessage)msg, dr.getDeliveryCount());
/*     */
/*  92 */       ClientConsumer handler = (ClientConsumer)this.callbackHandlers.get(dr.getConsumerId());
/*     */
/*  95 */       if (handler == null)
/*     */       {
/* 100 */         throw new IllegalStateException(this + " callback handler not found, message arrived after consumer is closed.");
/*     */       }
/*     */
/*     */       try
/*     */       {
/* 105 */         handler.handleMessage(proxy);
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 109 */         log.error("Failed to handle message", e);
/* 110 */         throw new HandleCallbackException(e.getMessage(), e);
View Full Code Here

/*     */
/* 135 */     CallbackManager oldCallbackManager = ((ClientConnectionDelegate)getParent().getParent().getDelegate()).getRemotingConnection().getCallbackManager();
/*     */
/* 137 */     CallbackManager newCallbackManager = ((ClientConnectionDelegate)ns.getParent().getParent().getDelegate()).getRemotingConnection().getCallbackManager();
/*     */
/* 142 */     ClientConsumer handler = oldCallbackManager.unregisterHandler(oldConsumerID);
/* 143 */     ClientConsumer newHandler = newCallbackManager.unregisterHandler(this.consumerID);
/*     */
/* 145 */     handler.synchronizeWith(newHandler);
/* 146 */     newCallbackManager.registerHandler(this.consumerID, handler);
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.jms.client.container.ClientConsumer

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.