public class InMemoryConsumer extends Object implements MessageConsumer
| Constructor and Description |
|---|
InMemoryConsumer(InMemoryStore store) |
| 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
|
String |
getId()
Returns the ID of this Message consumer.
|
boolean |
isAlive()
Check availability of connectivity with the message store
|
MessageContext |
receive()
Receives the next message from the store.
|
InMemoryConsumer |
setDestination(Queue<MessageContext> queue) |
void |
setId(int id)
Sets the ID of this message consumer.
|
public InMemoryConsumer(InMemoryStore store)
public MessageContext receive()
MessageConsumerreceive in interface MessageConsumerpublic boolean ack()
MessageConsumerack in interface MessageConsumertrue if the acknowledgement is successful. false otherwise.public boolean cleanup()
MessageConsumercleanup in interface MessageConsumertrue if cleanup is successful, false otherwise.public boolean isAlive()
MessageConsumerisAlive in interface MessageConsumertrue if connection available, false otherwise.public void setId(int id)
MessageConsumersetId in interface MessageConsumerid - IDpublic String getId()
MessageConsumergetId in interface MessageConsumerpublic InMemoryConsumer setDestination(Queue<MessageContext> queue)
Copyright © 2005–2024 Apache Software Foundation. All rights reserved.