Package org.apache.activemq.command

Examples of org.apache.activemq.command.MessagePull


        return info;
    }

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

        info.setConsumerId(createConsumerId("ConsumerId:1"));
        info.setDestination(createActiveMQDestination("Destination:2"));
        info.setTimeout(1);
    }
View Full Code Here


                            myTransportListener.onCommand(response);
                        }
                        return;
                    } else if (command instanceof MessagePull) {
                        // Simulate response to MessagePull if timed as we can't honor that now.
                        MessagePull pullRequest = (MessagePull) command;
                        if (pullRequest.getTimeout() != 0) {
                            MessageDispatch dispatch = new MessageDispatch();
                            dispatch.setConsumerId(pullRequest.getConsumerId());
                            dispatch.setDestination(pullRequest.getDestination());
                            myTransportListener.onCommand(dispatch);
                        }
                        return;
                    }
                }
View Full Code Here


    public static final MessagePullTest SINGLETON = new MessagePullTest();

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

        return info;
    }

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

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

     * broker to pull a message we are about to receive
     */
    protected void sendPullCommand(long timeout) throws JMSException {
        clearDispatchList();
        if (info.getCurrentPrefetchSize() == 0 && unconsumedMessages.isEmpty()) {
            MessagePull messagePull = new MessagePull();
            messagePull.configure(info);
            messagePull.setTimeout(timeout);
            session.asyncSendPacket(messagePull);
        }
    }
View Full Code Here

                            myTransportListener.onCommand(response);
                        }
                        return;
                    } else if (command instanceof MessagePull) {
                        // Simulate response to MessagePull if timed as we can't honor that now.
                        MessagePull pullRequest = (MessagePull) command;
                        if (pullRequest.getTimeout() != 0) {
                            MessageDispatch dispatch = new MessageDispatch();
                            dispatch.setConsumerId(pullRequest.getConsumerId());
                            dispatch.setDestination(pullRequest.getDestination());
                            myTransportListener.onCommand(dispatch);
                        }
                        return;
                    }
                }
View Full Code Here

     * broker to pull a message we are about to receive
     */
    protected void sendPullCommand(long timeout) throws JMSException {
        clearDeliveredList();
        if (info.getCurrentPrefetchSize() == 0 && unconsumedMessages.isEmpty()) {
            MessagePull messagePull = new MessagePull();
            messagePull.configure(info);
            messagePull.setTimeout(timeout);
            session.asyncSendPacket(messagePull);
        }
    }
View Full Code Here


    public static final MessagePullTest SINGLETON = new MessagePullTest();

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

        return info;
    }

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

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

     * broker to pull a message we are about to receive
     */
    protected void sendPullCommand(long timeout) throws JMSException {
        clearDispatchList();
        if (info.getPrefetchSize() == 0 && unconsumedMessages.isEmpty()) {
            MessagePull messagePull = new MessagePull();
            messagePull.configure(info);
            messagePull.setTimeout(timeout);
            session.asyncSendPacket(messagePull);
        }
    }
View Full Code Here

TOP

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

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.