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()
MessageConsumer
receive
in interface MessageConsumer
public boolean ack()
MessageConsumer
ack
in interface MessageConsumer
true
if the acknowledgement is successful. false
otherwise.public boolean cleanup() throws SynapseException
MessageConsumer
cleanup
in interface MessageConsumer
true
if cleanup is successful, false
otherwise.SynapseException
public boolean isAlive()
MessageConsumer
isAlive
in interface MessageConsumer
true
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)
MessageConsumer
setId
in interface MessageConsumer
id
- IDpublic void setStringId(String idString)
public String getId()
MessageConsumer
getId
in interface MessageConsumer
Copyright © 2005–2023 Apache Software Foundation. All rights reserved.