public class JmsConsumer extends Object implements MessageConsumer
| Constructor and Description |
|---|
JmsConsumer(JmsStore store)
Constructor for JMS consumer
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
ack()
Acknowledges the last message received so that it will be removed from the store.
|
boolean |
cleanup()
Cleans up this message consumer
|
javax.jms.Connection |
getConnection() |
javax.jms.MessageConsumer |
getConsumer() |
String |
getId()
Returns the ID of this Message consumer.
|
javax.jms.Session |
getSession() |
boolean |
isAlive()
Check availability of connectivity with the message store
|
boolean |
isInitialized() |
MessageContext |
receive()
Receives the next message from the store.
|
JmsConsumer |
setConnection(javax.jms.Connection connection) |
JmsConsumer |
setConsumer(javax.jms.MessageConsumer consumer) |
void |
setId(int id)
Sets the ID of this message consumer.
|
JmsConsumer |
setSession(javax.jms.Session session) |
void |
setStringId(String idString) |
public JmsConsumer(JmsStore store)
store - JMSStore associated to this JMS consumerpublic MessageContext receive()
MessageConsumerreceive in interface MessageConsumerpublic boolean ack()
MessageConsumerack in interface MessageConsumertrue if the acknowledgement is successful. false otherwise.public boolean cleanup()
throws SynapseException
MessageConsumercleanup in interface MessageConsumertrue if cleanup is successful, false otherwise.SynapseExceptionpublic boolean isAlive()
MessageConsumerisAlive in interface MessageConsumertrue if connection available, false otherwise.public javax.jms.Connection getConnection()
public JmsConsumer setConnection(javax.jms.Connection connection)
public javax.jms.Session getSession()
public JmsConsumer setSession(javax.jms.Session session)
public javax.jms.MessageConsumer getConsumer()
public JmsConsumer setConsumer(javax.jms.MessageConsumer consumer)
public boolean isInitialized()
public void setId(int id)
MessageConsumersetId in interface MessageConsumerid - IDpublic void setStringId(String idString)
public String getId()
MessageConsumergetId in interface MessageConsumerCopyright © 2005–2019 Apache Software Foundation. All rights reserved.