Class JmsProducer
- java.lang.Object
-
- org.apache.synapse.message.store.impl.jms.JmsProducer
-
- All Implemented Interfaces:
MessageProducer
public class JmsProducer extends Object implements MessageProducer
-
-
Constructor Summary
Constructors Constructor Description JmsProducer(JmsStore 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.javax.jms.SessiongetSession()booleanisInitialized()JmsProducersetConnection(javax.jms.Connection connection)voidsetId(int id)Sets the ID of this message consumer.JmsProducersetProducer(javax.jms.MessageProducer producer)JmsProducersetSession(javax.jms.Session session)booleanstoreMessage(MessageContext synCtx)Stores the given message to the store associated with this message consumer.
-
-
-
Constructor Detail
-
JmsProducer
public JmsProducer(JmsStore 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.
-
setConnection
public JmsProducer setConnection(javax.jms.Connection connection)
-
setSession
public JmsProducer setSession(javax.jms.Session session)
-
setProducer
public JmsProducer setProducer(javax.jms.MessageProducer producer)
-
isInitialized
public boolean isInitialized()
-
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
-
getSession
public javax.jms.Session getSession()
-
-