Examples of MessagePull


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);
        info.setCorrelationId("CorrelationId:3");
        info.setMessageId(createMessageId("MessageId:4"));
    }
View Full Code Here

Examples of org.apache.activemq.command.MessagePull

     * 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

Examples of org.apache.activemq.command.MessagePull

     * 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

Examples of org.apache.activemq.command.MessagePull

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

Examples of org.apache.activemq.command.MessagePull

     * 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

Examples of org.apache.activemq.command.MessagePull

                            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

Examples of org.apache.activemq.command.MessagePull

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

Examples of org.apache.activemq.command.MessagePull

     * 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

Examples of org.apache.activemq.command.MessagePull

                            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

Examples of org.apache.activemq.command.MessagePull

    /**
     * @return a new object instance
     */
    public DataStructure createObject() {
        return new MessagePull();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.