/** * Receives the next message produced for this message consumer. * <P> * This call blocks indefinitely until a message is produced or until this * message consumer is closed. * <P> * If this <CODE>receive</CODE> is done within a transaction, the consumer * retains the message until the transaction commits. * * @return the next message produced for this message consumer, or null if * this message consumer is concurrently closed */ @Override public Message receive() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(0); MessageDispatch md = dequeue(-1); if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
/** * Receives the next message if one is immediately available. * * @return the next message produced for this message consumer, or null if * one is not available * @throws JMSException if the JMS provider fails to receive the next * message due to some internal error. */ @Override public Message receiveNoWait() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(-1); MessageDispatch md; if (info.getPrefetchSize() == 0) { md = dequeue(-1); // We let the broker let us know when we // timeout. } else { md = dequeue(0); } if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
return createActiveMQMessage(md);
return; ActiveMQMessage message = createActiveMQMessage(md); beforeMessageIsConsumed(md); try {
/** * Receives the next message produced for this message consumer. * <P> * This call blocks indefinitely until a message is produced or until this * message consumer is closed. * <P> * If this <CODE>receive</CODE> is done within a transaction, the consumer * retains the message until the transaction commits. * * @return the next message produced for this message consumer, or null if * this message consumer is concurrently closed */ @Override public Message receive() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(0); MessageDispatch md = dequeue(-1); if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
/** * Receives the next message produced for this message consumer. * <P> * This call blocks indefinitely until a message is produced or until this * message consumer is closed. * <P> * If this <CODE>receive</CODE> is done within a transaction, the consumer * retains the message until the transaction commits. * * @return the next message produced for this message consumer, or null if * this message consumer is concurrently closed */ @Override public Message receive() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(0); MessageDispatch md = dequeue(-1); if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
/** * Receives the next message produced for this message consumer. * <P> * This call blocks indefinitely until a message is produced or until this * message consumer is closed. * <P> * If this <CODE>receive</CODE> is done within a transaction, the consumer * retains the message until the transaction commits. * * @return the next message produced for this message consumer, or null if * this message consumer is concurrently closed */ @Override public Message receive() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(0); MessageDispatch md = dequeue(-1); if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
/** * Receives the next message produced for this message consumer. * <P> * This call blocks indefinitely until a message is produced or until this * message consumer is closed. * <P> * If this <CODE>receive</CODE> is done within a transaction, the consumer * retains the message until the transaction commits. * * @return the next message produced for this message consumer, or null if * this message consumer is concurrently closed */ public Message receive() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(0); MessageDispatch md = dequeue(-1); if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
/** * Receives the next message if one is immediately available. * * @return the next message produced for this message consumer, or null if * one is not available * @throws JMSException if the JMS provider fails to receive the next * message due to some internal error. */ @Override public Message receiveNoWait() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(-1); MessageDispatch md; if (info.getPrefetchSize() == 0) { md = dequeue(-1); // We let the broker let us know when we // timeout. } else { md = dequeue(0); } if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
/** * Receives the next message if one is immediately available. * * @return the next message produced for this message consumer, or null if * one is not available * @throws JMSException if the JMS provider fails to receive the next * message due to some internal error. */ @Override public Message receiveNoWait() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(-1); MessageDispatch md; if (info.getPrefetchSize() == 0) { md = dequeue(-1); // We let the broker let us know when we // timeout. } else { md = dequeue(0); } if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
/** * Receives the next message if one is immediately available. * * @return the next message produced for this message consumer, or null if * one is not available * @throws JMSException if the JMS provider fails to receive the next * message due to some internal error. */ @Override public Message receiveNoWait() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(-1); MessageDispatch md; if (info.getPrefetchSize() == 0) { md = dequeue(-1); // We let the broker let us know when we // timeout. } else { md = dequeue(0); } if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
/** * Receives the next message if one is immediately available. * * @return the next message produced for this message consumer, or null if * one is not available * @throws JMSException if the JMS provider fails to receive the next * message due to some internal error. */ public Message receiveNoWait() throws JMSException { checkClosed(); checkMessageListener(); sendPullCommand(-1); MessageDispatch md; if (info.getPrefetchSize() == 0) { md = dequeue(-1); // We let the broker let us know when we // timeout. } else { md = dequeue(0); } if (md == null) { return null; } beforeMessageIsConsumed(md); afterMessageIsConsumed(md, false); return createActiveMQMessage(md); }
return createActiveMQMessage(md);
if (this.info.isBrowser() || !session.connection.isDuplicate(this, md.getMessage())) { if (listener != null && unconsumedMessages.isRunning()) { ActiveMQMessage message = createActiveMQMessage(md); beforeMessageIsConsumed(md); try {
return; ActiveMQMessage message = createActiveMQMessage(md); beforeMessageIsConsumed(md); try {
return; ActiveMQMessage message = createActiveMQMessage(md); beforeMessageIsConsumed(md); try {
return; ActiveMQMessage message = createActiveMQMessage(md); beforeMessageIsConsumed(md); try {