Package org.apache.activemq.command

Examples of org.apache.activemq.command.MessageDispatchNotification


     * Notifiy the Broker that a dispatch has happened
     *
     * @param messageDispatch
     */
    public void postProcessDispatch(MessageDispatch messageDispatch) {
        MessageDispatchNotification mdn = new MessageDispatchNotification();
        mdn.setConsumerId(messageDispatch.getConsumerId());
        mdn.setDeliverySequenceId(messageDispatch.getDeliverySequenceId());
        mdn.setDestination(messageDispatch.getDestination());
        if (messageDispatch.getMessage() != null) {
            Message msg = messageDispatch.getMessage();
            mdn.setMessageId(msg.getMessageId());
            sendAsyncToSlave(mdn);
        }
        super.postProcessDispatch(messageDispatch);
    }
View Full Code Here


     * similar logic to send() below.
     * @param messageDispatch
     */
    public void preProcessDispatch(MessageDispatch messageDispatch) {
        super.preProcessDispatch(messageDispatch);
        MessageDispatchNotification mdn = new MessageDispatchNotification();
        mdn.setConsumerId(messageDispatch.getConsumerId());
        mdn.setDeliverySequenceId(messageDispatch.getDeliverySequenceId());
        mdn.setDestination(messageDispatch.getDestination());
        if (messageDispatch.getMessage() != null) {
            Message msg = messageDispatch.getMessage();
            mdn.setMessageId(msg.getMessageId());
            sendAsyncToSlave(mdn);
        }
    }
View Full Code Here

     * similar logic to send() below.
     * @param messageDispatch
     */
    public void preProcessDispatch(MessageDispatch messageDispatch) {
        super.preProcessDispatch(messageDispatch);
        MessageDispatchNotification mdn = new MessageDispatchNotification();
        mdn.setConsumerId(messageDispatch.getConsumerId());
        mdn.setDeliverySequenceId(messageDispatch.getDeliverySequenceId());
        mdn.setDestination(messageDispatch.getDestination());
        if (messageDispatch.getMessage() != null) {
            Message msg = messageDispatch.getMessage();
            mdn.setMessageId(msg.getMessageId());
            if (consumers.containsKey(messageDispatch.getConsumerId())) {
                sendSyncToSlave(mdn);
            }
        }
    }
View Full Code Here

     * similar logic to send() below.
     * @param messageDispatch
     */
    public void preProcessDispatch(MessageDispatch messageDispatch) {
        super.preProcessDispatch(messageDispatch);
        MessageDispatchNotification mdn = new MessageDispatchNotification();
        mdn.setConsumerId(messageDispatch.getConsumerId());
        mdn.setDeliverySequenceId(messageDispatch.getDeliverySequenceId());
        mdn.setDestination(messageDispatch.getDestination());
        if (messageDispatch.getMessage() != null) {
            Message msg = messageDispatch.getMessage();
            mdn.setMessageId(msg.getMessageId());
            if (consumers.containsKey(messageDispatch.getConsumerId())) {
                sendSyncToSlave(mdn);
            }
        }
    }
View Full Code Here

     * Notifiy the Broker that a dispatch has happened
     * @param messageDispatch
     */
    public void processDispatch(MessageDispatch messageDispatch){
       
        MessageDispatchNotification mdn = new MessageDispatchNotification();
        mdn.setConsumerId(messageDispatch.getConsumerId());
        mdn.setDeliverySequenceId(messageDispatch.getDeliverySequenceId());
        mdn.setDestination(messageDispatch.getDestination());
        if( messageDispatch.getMessage() != null )
            mdn.setMessageId(messageDispatch.getMessage().getMessageId());
        sendAsyncToSlave(mdn);
        super.processDispatch(messageDispatch);
    }
View Full Code Here

public class MessageDispatchNotificationTest extends BaseCommandTestSupport {

    public static final MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest();

    public Object createObject() throws Exception {
        MessageDispatchNotification info = new MessageDispatchNotification();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        MessageDispatchNotification info = (MessageDispatchNotification)object;
        info.setConsumerId(createConsumerId("ConsumerId:1"));
        info.setDestination(createActiveMQDestination("Destination:2"));
        info.setDeliverySequenceId(1);
        info.setMessageId(createMessageId("MessageId:3"));

    }
View Full Code Here


    public static final MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest();

    public Object createObject() throws Exception {
        MessageDispatchNotification info = new MessageDispatchNotification();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        MessageDispatchNotification info = (MessageDispatchNotification) object;

        info.setConsumerId(createConsumerId("ConsumerId:1"));
        info.setDestination(createActiveMQDestination("Destination:2"));
        info.setDeliverySequenceId(1);
        info.setMessageId(createMessageId("MessageId:3"));
    }
View Full Code Here


    public static final MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest();

    public Object createObject() throws Exception {
        MessageDispatchNotification info = new MessageDispatchNotification();
        populateObject(info);
        return info;
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.MessageDispatchNotification

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.