Package org.jboss.jms.client.remoting

Examples of org.jboss.jms.client.remoting.CallbackManager


                                    sessionDelegate, consumerDelegate, consumerID, queueName,
                                    prefetchSize, sessionExecutor, maxDeliveries);
     
      sessionState.addCallbackHandler(messageHandler);
     
      CallbackManager cm = connectionState.getRemotingConnection().getCallbackManager();
      cm.registerHandler(consumerID, messageHandler);
        
      consumerState.setMessageCallbackHandler(messageHandler);
     
      //Now we have finished creating the client consumer, we can tell the SCD
      //we are ready
View Full Code Here


      SessionState sessionState = (SessionState)consumerState.getParent();
      ConnectionState connectionState = (ConnectionState)sessionState.getParent();
                
      sessionState.removeCallbackHandler(consumerState.getMessageCallbackHandler());

      CallbackManager cm = connectionState.getRemotingConnection().getCallbackManager();
      cm.unregisterHandler(consumerState.getConsumerID());
        
      //And then we cancel any messages still in the message callback handler buffer    
      consumerState.getMessageCallbackHandler().cancelBuffer();
                                  
      return l;
View Full Code Here

      ConsumerState newState = (ConsumerState)ns;

      int oldConsumerID = consumerID;
      consumerID = newState.consumerID;
     
      CallbackManager oldCallbackManager = ((ClientConnectionDelegate)getParent().getParent().
         getDelegate()).getRemotingConnection().getCallbackManager();
      CallbackManager newCallbackManager = ((ClientConnectionDelegate)ns.getParent().getParent().
         getDelegate()).getRemotingConnection().getCallbackManager();

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

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

         queueName = consumerState.getDestination().getName();
      }
     
      boolean autoFlowControl = ((Boolean)mi.getArguments()[5]).booleanValue();
     
      CallbackManager cm = connectionState.getRemotingConnection().getCallbackManager();

      ClientConsumer messageHandler =
         new ClientConsumer(isCC, sessionState.getAcknowledgeMode(),
                            sessionDelegate, consumerDelegate, consumerID, queueName,
                            prefetchSize, executor, maxDeliveries, consumerState.isShouldAck(),
                            redeliveryDelay, consumerState.getMaxRetryChangeRate(),
                            consumerState.getRetryChangeRateInterval(),
                            fcc != null, cm, consumerState.getMinTimeoutProcessTime());
     
      sessionState.addCallbackHandler(messageHandler);
     
      cm.registerHandler(consumerID, messageHandler);
        
      consumerState.setClientConsumer(messageHandler);
     
      if (autoFlowControl)
      {
View Full Code Here

         SessionState sessionState = (SessionState) consumerState.getParent();
         ConnectionState connectionState = (ConnectionState) sessionState.getParent();

         sessionState.removeCallbackHandler(consumerState.getClientConsumer());

         CallbackManager cm = connectionState.getRemotingConnection().getCallbackManager();
         cm.unregisterHandler(consumerState.getConsumerID());

         //And then we cancel any messages still in the message callback handler buffer
         consumerState.getClientConsumer().cancelBuffer();

         return l;
View Full Code Here

      ConsumerState newState = (ConsumerState)ns;

      String oldConsumerID = consumerID;
      consumerID = newState.consumerID;
     
      CallbackManager oldCallbackManager = ((ClientConnectionDelegate)getParent().getParent().
         getDelegate()).getRemotingConnection().getCallbackManager();
      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

                            prefetchSize, executor, maxDeliveries, consumerState.isShouldAck(),
                            redeliveryDelay);
     
      sessionState.addCallbackHandler(messageHandler);
     
      CallbackManager cm = connectionState.getRemotingConnection().getCallbackManager();
      cm.registerHandler(consumerID, messageHandler);
        
      consumerState.setClientConsumer(messageHandler);
     
      if (autoFlowControl)
      {
View Full Code Here

         SessionState sessionState = (SessionState) consumerState.getParent();
         ConnectionState connectionState = (ConnectionState) sessionState.getParent();

         sessionState.removeCallbackHandler(consumerState.getClientConsumer());

         CallbackManager cm = connectionState.getRemotingConnection().getCallbackManager();
         cm.unregisterHandler(consumerState.getConsumerID());

         //And then we cancel any messages still in the message callback handler buffer
         consumerState.getClientConsumer().cancelBuffer();
        
         sessionState.getExecutor().clearClassLoader();
View Full Code Here

                            prefetchSize, executor, maxDeliveries, consumerState.isShouldAck(),
                            redeliveryDelay);
     
      sessionState.addCallbackHandler(messageHandler);
     
      CallbackManager cm = connectionState.getRemotingConnection().getCallbackManager();
      cm.registerHandler(consumerID, messageHandler);
        
      consumerState.setClientConsumer(messageHandler);
     
      if (autoFlowControl)
      {
View Full Code Here

         SessionState sessionState = (SessionState) consumerState.getParent();
         ConnectionState connectionState = (ConnectionState) sessionState.getParent();

         sessionState.removeCallbackHandler(consumerState.getClientConsumer());

         CallbackManager cm = connectionState.getRemotingConnection().getCallbackManager();
         cm.unregisterHandler(consumerState.getConsumerID());

         //And then we cancel any messages still in the message callback handler buffer
         consumerState.getClientConsumer().cancelBuffer();

         return l;
View Full Code Here

TOP

Related Classes of org.jboss.jms.client.remoting.CallbackManager

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.