Methods Summary |
---|
public void | close()
if (trace)
log.trace("close " + this);
try
{
closeConsumer();
}
finally
{
session.removeConsumer(this);
}
|
void | closeConsumer()
consumer.close();
|
public javax.jms.MessageListener | getMessageListener()
session.checkStrict();
return consumer.getMessageListener();
|
public java.lang.String | getMessageSelector()
return consumer.getMessageSelector();
|
public javax.jms.Message | receive()
if (trace)
log.trace("receive " + this);
Message message = consumer.receive();
if (trace)
log.trace("received " + this + " result=" + message);
if (message == null)
return null;
else
return wrapMessage(message);
|
public javax.jms.Message | receive(long timeout)
if (trace)
log.trace("receive " + this + " timeout=" + timeout);
Message message = consumer.receive(timeout);
if (trace)
log.trace("received " + this + " result=" + message);
if (message == null)
return null;
else
return wrapMessage(message);
|
public javax.jms.Message | receiveNoWait()
if (trace)
log.trace("receiveNoWait " + this);
Message message = consumer.receiveNoWait();
if (trace)
log.trace("received " + this + " result=" + message);
if (message == null)
return null;
else
return wrapMessage(message);
|
public void | setMessageListener(javax.jms.MessageListener listener)
session.checkStrict();
if (listener == null)
consumer.setMessageListener(null);
else
consumer.setMessageListener(wrapMessageListener(listener));
|
javax.jms.Message | wrapMessage(javax.jms.Message message)
if (message instanceof BytesMessage)
return new JmsBytesMessage((BytesMessage) message, session);
else if (message instanceof MapMessage)
return new JmsMapMessage((MapMessage) message, session);
else if (message instanceof ObjectMessage)
return new JmsObjectMessage((ObjectMessage) message, session);
else if (message instanceof StreamMessage)
return new JmsStreamMessage((StreamMessage) message, session);
else if (message instanceof TextMessage)
return new JmsTextMessage((TextMessage) message, session);
return new JmsMessage(message, session);
|
javax.jms.MessageListener | wrapMessageListener(javax.jms.MessageListener listener)
return new JmsMessageListener(listener, this);
|