/** * Gets this message consumer's message selector expression. * * @return this message consumer's message selector, or null if no message * selector exists for the message consumer (that is, if the message * selector was not set or was set to null or the empty string) * @throws JMSException if the JMS provider fails to receive the next * message due to some internal error. */ @Override public String getMessageSelector() throws JMSException { checkClosed(); return selector; }
/** * Gets the message consumer's <CODE>MessageListener</CODE>. * * @return the listener for the message consumer, or null if no listener is * set * @throws JMSException if the JMS provider fails to get the message * listener due to some internal error. * @see javax.jms.MessageConsumer#setMessageListener(javax.jms.MessageListener) */ @Override public MessageListener getMessageListener() throws JMSException { checkClosed(); return this.messageListener.get(); }
@Override public void execute() throws Exception { checkClosed(); session.checkClosed(); session.acknowledge(); } });
@Override public void execute() throws Exception { checkClosed(); session.checkClosed(); acknowledge(md); } });
checkClosed(); if (info.getPrefetchSize() == 0) { throw new JMSException("Illegal prefetch size of zero. This setting is not supported for asynchronous consumers please set a value of at least 1");
/** * 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); }
checkClosed(); checkMessageListener(); if (timeout == 0) {
/** * Gets this message consumer's message selector expression. * * @return this message consumer's message selector, or null if no message * selector exists for the message consumer (that is, if the message * selector was not set or was set to null or the empty string) * @throws JMSException if the JMS provider fails to receive the next * message due to some internal error. */ @Override public String getMessageSelector() throws JMSException { checkClosed(); return selector; }
/** * Gets this message consumer's message selector expression. * * @return this message consumer's message selector, or null if no message * selector exists for the message consumer (that is, if the message * selector was not set or was set to null or the empty string) * @throws JMSException if the JMS provider fails to receive the next * message due to some internal error. */ @Override public String getMessageSelector() throws JMSException { checkClosed(); return selector; }
/** * Gets this message consumer's message selector expression. * * @return this message consumer's message selector, or null if no message * selector exists for the message consumer (that is, if the message * selector was not set or was set to null or the empty string) * @throws JMSException if the JMS provider fails to receive the next * message due to some internal error. */ public String getMessageSelector() throws JMSException { checkClosed(); return selector; }
/** * Gets the message consumer's <CODE>MessageListener</CODE>. * * @return the listener for the message consumer, or null if no listener is * set * @throws JMSException if the JMS provider fails to get the message * listener due to some internal error. * @see javax.jms.MessageConsumer#setMessageListener(javax.jms.MessageListener) */ @Override public MessageListener getMessageListener() throws JMSException { checkClosed(); return this.messageListener.get(); }
/** * Gets the message consumer's <CODE>MessageListener</CODE>. * * @return the listener for the message consumer, or null if no listener is * set * @throws JMSException if the JMS provider fails to get the message * listener due to some internal error. * @see javax.jms.MessageConsumer#setMessageListener(javax.jms.MessageListener) */ @Override public MessageListener getMessageListener() throws JMSException { checkClosed(); return this.messageListener.get(); }
/** * Gets the message consumer's <CODE>MessageListener</CODE>. * * @return the listener for the message consumer, or null if no listener is * set * @throws JMSException if the JMS provider fails to get the message * listener due to some internal error. * @see javax.jms.MessageConsumer#setMessageListener(javax.jms.MessageListener) */ @Override public MessageListener getMessageListener() throws JMSException { checkClosed(); return this.messageListener.get(); }
@Override public void execute() throws Exception { checkClosed(); session.checkClosed(); acknowledge(md); } });
@Override public void execute() throws Exception { checkClosed(); session.checkClosed(); session.acknowledge(); } });
@Override public void execute() throws Exception { checkClosed(); session.checkClosed(); session.acknowledge(); } });
@Override public void execute() throws Exception { checkClosed(); session.checkClosed(); acknowledge(md); } });
@Override public void execute() throws Exception { checkClosed(); session.checkClosed(); acknowledge(md); } });
@Override public void execute() throws Exception { checkClosed(); session.checkClosed(); session.acknowledge(); } });