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 boolean
cleanup()
Cleans up this message consumerString
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.
-
-
-
Constructor Detail
-
InMemoryProducer
public InMemoryProducer(InMemoryStore store)
-
-
Method Detail
-
storeMessage
public boolean storeMessage(MessageContext synCtx)
Description copied from interface:MessageProducer
Stores the given message to the store associated with this message consumer.- Specified by:
storeMessage
in interfaceMessageProducer
- Parameters:
synCtx
- Message to be saved.- Returns:
true
if storing of the message is successful,false
otherwise.
-
cleanup
public boolean cleanup()
Description copied from interface:MessageProducer
Cleans up this message consumer- Specified by:
cleanup
in interfaceMessageProducer
- Returns:
true
if clean up is successful,false
otherwise.
-
setId
public void setId(int id)
Description copied from interface:MessageProducer
Sets the ID of this message consumer.- Specified by:
setId
in interfaceMessageProducer
- Parameters:
id
- ID
-
getId
public String getId()
Description copied from interface:MessageProducer
Returns the ID of this message consumer.- Specified by:
getId
in interfaceMessageProducer
- Returns:
- ID
-
setDestination
public InMemoryProducer setDestination(Queue<MessageContext> queue)
-
-