public class InMemoryProducer extends Object implements MessageProducer
Constructor and Description |
---|
InMemoryProducer(InMemoryStore store) |
Modifier and Type | Method and Description |
---|---|
boolean |
cleanup()
Cleans up this message consumer
|
String |
getId()
Returns the ID of this message consumer.
|
InMemoryProducer |
setDestination(Queue<MessageContext> queue) |
void |
setId(int id)
Sets the ID of this message consumer.
|
boolean |
storeMessage(MessageContext synCtx)
Stores the given message to the store associated with this message consumer.
|
public InMemoryProducer(InMemoryStore store)
public boolean storeMessage(MessageContext synCtx)
MessageProducer
storeMessage
in interface MessageProducer
synCtx
- Message to be saved.true
if storing of the message is successful, false
otherwise.public boolean cleanup()
MessageProducer
cleanup
in interface MessageProducer
true
if clean up is successful, false
otherwise.public void setId(int id)
MessageProducer
setId
in interface MessageProducer
id
- IDpublic String getId()
MessageProducer
getId
in interface MessageProducer
public InMemoryProducer setDestination(Queue<MessageContext> queue)
Copyright © 2005–2018 Apache Software Foundation. All rights reserved.