Class InMemoryProducer
- java.lang.Object
-
- org.apache.synapse.message.store.impl.memory.InMemoryProducer
-
- All Implemented Interfaces:
MessageProducer
public class InMemoryProducer extends Object implements MessageProducer
-
-
Constructor Summary
Constructors Constructor Description InMemoryProducer(InMemoryStore store)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancleanup()Cleans up this message consumerStringgetId()Returns the ID of this message consumer.InMemoryProducersetDestination(Queue<MessageContext> queue)voidsetId(int id)Sets the ID of this message consumer.booleanstoreMessage(MessageContext synCtx)Stores the given message to the store associated with this message consumer.
-
-
-
Constructor Detail
-
InMemoryProducer
public InMemoryProducer(InMemoryStore store)
-
-
Method Detail
-
storeMessage
public boolean storeMessage(MessageContext synCtx)
Description copied from interface:MessageProducerStores the given message to the store associated with this message consumer.- Specified by:
storeMessagein interfaceMessageProducer- Parameters:
synCtx- Message to be saved.- Returns:
trueif storing of the message is successful,falseotherwise.
-
cleanup
public boolean cleanup()
Description copied from interface:MessageProducerCleans up this message consumer- Specified by:
cleanupin interfaceMessageProducer- Returns:
trueif clean up is successful,falseotherwise.
-
setId
public void setId(int id)
Description copied from interface:MessageProducerSets the ID of this message consumer.- Specified by:
setIdin interfaceMessageProducer- Parameters:
id- ID
-
getId
public String getId()
Description copied from interface:MessageProducerReturns the ID of this message consumer.- Specified by:
getIdin interfaceMessageProducer- Returns:
- ID
-
setDestination
public InMemoryProducer setDestination(Queue<MessageContext> queue)
-
-