public abstract class AbstractJmsClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
clientName |
protected int |
destCount |
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.
|
javax.jms.Destination |
createCompositeDestination(int destIndex,
int destCount) |
protected javax.jms.Destination |
createCompositeDestination(String name,
int destIndex,
int destCount) |
javax.jms.Destination[] |
createDestination(int destIndex,
int destCount) |
protected javax.jms.Destination |
createDestination(String name) |
abstract JmsClientProperties |
getClient() |
String |
getClientName() |
javax.jms.Connection |
getConnection() |
int |
getDestCount() |
int |
getDestIndex() |
javax.jms.ConnectionFactory |
getFactory() |
javax.jms.Session |
getSession() |
abstract void |
setClient(JmsClientProperties client) |
void |
setClientName(String clientName) |
void |
setDestCount(int destCount) |
void |
setDestIndex(int destIndex) |
void |
setFactory(javax.jms.ConnectionFactory factory) |
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 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[] createDestination(int destIndex,
int destCount)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.Destination createCompositeDestination(int destIndex,
int destCount)
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected javax.jms.Destination createCompositeDestination(String name, int destIndex, int destCount) throws javax.jms.JMSException
javax.jms.JMSExceptionprotected javax.jms.Destination createDestination(String name) 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-2015 The Apache Software Foundation. All Rights Reserved.