public class JmsStore extends AbstractMessageStore
| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE
Whether to cache the connection or not
|
static String |
CONN_FACTORY |
static String |
CONNECTION_STRING |
static String |
CONSUMER_TIMEOUT |
static String |
DESTINATION
JMS destination (ie.
|
static String |
GUARANTEED_DELIVERY_ENABLE
Guaranteed delivery status
|
static String |
JMS_SPEC_11 |
static String |
JMS_VERSION
JMS Specification version
|
protected static org.apache.commons.logging.Log |
log |
static String |
NAMING_FACTORY_INITIAL |
static String |
PASSWORD
JMS Broker password
|
static String |
PROVIDER_URL |
static String |
QUEUE_PREFIX
JNDI Queue Prefix
|
static String |
USERNAME
JMS Broker username
|
description, fileName, lock, messageStoreMBean, messageStoreObservers, name, parameterKeyMap, parameters, sequence, synapseConfiguration| Constructor and Description |
|---|
JmsStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(javax.jms.Connection connection,
javax.jms.Session session)
Cleans up the JMS Connection and Session associated with a JMS client.
|
void |
clear()
Delete all the Messages in the Message Store
|
void |
closeConnection(javax.jms.Connection connection)
Closes the given JMS Connection.
|
void |
closeWriteConnection()
Closes the existing JMS message producer connection.
|
void |
destroy()
This method should implement the destroying of the
implemented parts of the configuration.
|
MessageContext |
get(int index)
Return the Message in given index position
(this may depend on the implementation)
|
MessageContext |
get(String messageId)
Get the Message with the given ID from the Message store without removing it
|
List<MessageContext> |
getAll()
Get the All messages in the Message store without removing them from the queue
|
MessageConsumer |
getConsumer()
Returns a Message Consumer for this message store.
|
MessageProducer |
getProducer()
Returns a Message Producer for this message store.
|
int |
getType()
Returns the type of this message store.
|
void |
init(SynapseEnvironment se)
End of unsupported operations.
|
org.apache.axis2.context.MessageContext |
newAxis2Mc() |
javax.jms.Connection |
newConnection()
Creates a new JMS Connection.
|
javax.jms.MessageConsumer |
newConsumer(javax.jms.Session session)
Returns a new JMS Message Consumer.
|
javax.jms.MessageProducer |
newProducer(javax.jms.Session session)
Creates a new JMS Message Producer.
|
javax.jms.Session |
newSession(javax.jms.Connection connection,
int mode,
boolean isProducerSession)
Creates a new JMS Session.
|
MessageContext |
newSynapseMc(org.apache.axis2.context.MessageContext msgCtx) |
void |
newWriteConnection()
Creates a new JMS Message producer connection.
|
javax.jms.Connection |
producerConnection()
Returns the existing JMS message producer connection.
|
MessageContext |
remove()
JMS Message store does not support following operations.
|
MessageContext |
remove(String messageID)
Delete and return the MessageContext with given Message id
|
void |
reset(javax.jms.Connection connection,
javax.jms.Session session)
Resets the JMS session for next message
|
void |
setCachedProducer(MessageProducer cachedProducer) |
void |
setParameters(Map<String,Object> parameters)
set the implementation specific parameters
|
void |
setProducer(MessageProducer producer) |
addParameter, addParameterKey, dequeued, difference, enqueued, getArtifactContainerName, getDescription, getFileName, getLock, getName, getParameterKey, getParameterKeyMap, getParameters, isEdited, nextConsumerId, nextProducerId, notifyMessageAddition, notifyMessageRemoval, registerObserver, setArtifactContainerName, setDescription, setFileName, setIsEdited, setName, size, unregisterObserverprotected static final org.apache.commons.logging.Log log
public static final String USERNAME
public static final String PASSWORD
public static final String CACHE
public static final String DESTINATION
public static final String JMS_VERSION
public static final String CONSUMER_TIMEOUT
public static final String CONN_FACTORY
public static final String NAMING_FACTORY_INITIAL
public static final String CONNECTION_STRING
public static final String PROVIDER_URL
public static final String QUEUE_PREFIX
public static final String GUARANTEED_DELIVERY_ENABLE
public static final String JMS_SPEC_11
public MessageProducer getProducer()
MessageStorepublic MessageConsumer getConsumer() throws SynapseException
MessageStoreSynapseExceptionpublic int getType()
MessageStoreConstants.JMS_MS, Constants.INMEMORY_MS,
or Constants.JDBC_MSgetType in interface MessageStoregetType in class AbstractMessageStorepublic MessageContext remove() throws NoSuchElementException
NoSuchElementException - if store is emptypublic void clear()
MessageStorepublic MessageContext remove(String messageID)
MessageStoremessageID - message id of the Messagepublic MessageContext get(int index)
MessageStoreindex - position of the messagepublic List<MessageContext> getAll()
MessageStorepublic MessageContext get(String messageId)
MessageStoremessageId - A message ID stringpublic void init(SynapseEnvironment se)
init in interface ManagedLifecycleinit in class AbstractMessageStorese - SynapseEnvironment to be used for initializationpublic void destroy()
throws SynapseException
ManagedLifecycledestroy in interface ManagedLifecycledestroy in class AbstractMessageStoreSynapseExceptionpublic javax.jms.Connection newConnection()
throws javax.jms.JMSException,
StoreForwardException
javax.jms.JMSException - on a JMS issueStoreForwardException - on a non JMS issuepublic javax.jms.Session newSession(javax.jms.Connection connection,
int mode,
boolean isProducerSession)
throws javax.jms.JMSException,
StoreForwardException
connection - The JMS Connection that must be used when creating the session.mode - Acknowledgement mode that must be used for this session.isProducerSession - Type of the session going to createjavax.jms.JMSException - on a JMS related issueStoreForwardException - on a non JMS related issuepublic javax.jms.MessageProducer newProducer(javax.jms.Session session)
throws javax.jms.JMSException,
StoreForwardException
session - A JMS Session.javax.jms.JMSExceptionStoreForwardExceptionpublic javax.jms.MessageConsumer newConsumer(javax.jms.Session session)
throws javax.jms.JMSException,
StoreForwardException
session - JMS Session to create consumer formjavax.jms.JMSException - on JMS issue when creating consumer with JMS providerStoreForwardExceptionpublic void newWriteConnection()
throws StoreForwardException,
javax.jms.JMSException
StoreForwardException - on a non JMS related issuejavax.jms.JMSException - on a JMS issuepublic void closeWriteConnection()
throws javax.jms.JMSException
javax.jms.JMSException - on a JMS level issuepublic javax.jms.Connection producerConnection()
public void closeConnection(javax.jms.Connection connection)
throws javax.jms.JMSException
connection - The JMS Connection to be closed.javax.jms.JMSException - on a JMS level issuepublic void reset(javax.jms.Connection connection,
javax.jms.Session session)
throws javax.jms.JMSException
connection - JMS Connectionsession - JMS Session associated with the given connectionjavax.jms.JMSExceptionpublic void cleanup(javax.jms.Connection connection,
javax.jms.Session session)
throws javax.jms.JMSException
connection - JMS Connectionsession - JMS Session associated with the given connectionjavax.jms.JMSExceptionpublic org.apache.axis2.context.MessageContext newAxis2Mc()
public MessageContext newSynapseMc(org.apache.axis2.context.MessageContext msgCtx)
public void setParameters(Map<String,Object> parameters)
MessageStoresetParameters in interface MessageStoresetParameters in class AbstractMessageStoreparameters - A map of parameters or nullpublic void setCachedProducer(MessageProducer cachedProducer)
public void setProducer(MessageProducer producer)
Copyright © 2005–2024 Apache Software Foundation. All rights reserved.