public abstract class AbstractJmsClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
clientName |
protected int |
destCount |
static String |
DESTINATION_SEPARATOR |
protected int |
destIndex |
protected javax.jms.ConnectionFactory |
factory |
protected javax.jms.Connection |
jmsConnection |
protected javax.jms.Session |
jmsSession |
| Constructor and Description |
|---|
AbstractJmsClient(javax.jms.ConnectionFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
commitTxIfNecessary()
Helper method that checks if session is
transacted and whether to commit the tx based on commitAfterXMsgs
property.
|
protected javax.jms.Destination |
createCompositeDestination(byte destinationType,
String destName,
int destCount) |
protected javax.jms.Destination |
createCompositeDestination(String destName,
int destCount) |
protected javax.jms.Destination |
createDestination(String destName) |
javax.jms.Destination[] |
createDestinations(int destCount) |
protected javax.jms.Destination |
createTemporaryDestination(String destName) |
abstract JmsClientProperties |
getClient() |
String |
getClientName() |
javax.jms.Connection |
getConnection() |
int |
getDestCount() |
protected byte |
getDestinationType(String destName) |
int |
getDestIndex() |
javax.jms.ConnectionFactory |
getFactory() |
javax.jms.Session |
getSession() |
protected String |
getSimpleName(String destName) |
abstract void |
setClient(JmsClientProperties client) |
void |
setClientName(String clientName) |
void |
setDestCount(int destCount) |
void |
setDestIndex(int destIndex) |
void |
setFactory(javax.jms.ConnectionFactory factory) |
public static final String DESTINATION_SEPARATOR
protected javax.jms.ConnectionFactory factory
protected javax.jms.Connection jmsConnection
protected javax.jms.Session jmsSession
protected int destCount
protected int destIndex
protected String clientName
public AbstractJmsClient(javax.jms.ConnectionFactory factory)
public abstract JmsClientProperties getClient()
public abstract void setClient(JmsClientProperties client)
public javax.jms.ConnectionFactory getFactory()
public void setFactory(javax.jms.ConnectionFactory factory)
public int getDestCount()
public void setDestCount(int destCount)
public int getDestIndex()
public void setDestIndex(int destIndex)
public String getClientName()
public void setClientName(String clientName)
public javax.jms.Connection getConnection() throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.Session getSession() throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.Destination[] createDestinations(int destCount) throws javax.jms.JMSException
javax.jms.JMSExceptionprotected javax.jms.Destination createCompositeDestination(String destName, int destCount) throws javax.jms.JMSException
javax.jms.JMSExceptionprotected javax.jms.Destination createCompositeDestination(byte destinationType, String destName, int destCount) throws javax.jms.JMSException
javax.jms.JMSExceptionprotected String getSimpleName(String destName)
protected byte getDestinationType(String destName)
protected javax.jms.Destination createDestination(String destName) throws javax.jms.JMSException
javax.jms.JMSExceptionprotected javax.jms.Destination createTemporaryDestination(String destName) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic boolean commitTxIfNecessary() throws javax.jms.JMSException
javax.jms.JMSException - in case the call to JMS Session.commit() fails.Copyright © 2005–2018 FuseSource, Corp.. All rights reserved.