|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.jms.extra.AbstractJmsSenderTemplate
public abstract class AbstractJmsSenderTemplate
Common functionality for the sender templates.
Field Summary | |
---|---|
protected AtomikosConnectionFactoryBean |
connectionFactoryBean
|
protected javax.jms.Destination |
destination
|
protected boolean |
inited
|
protected String |
password
|
Constructor Summary | |
---|---|
protected |
AbstractJmsSenderTemplate()
|
Method Summary | |
---|---|
protected abstract void |
afterUseWithoutErrors(javax.jms.Connection c,
javax.jms.Session s)
|
void |
close()
Closes all resources. |
protected abstract void |
destroy(javax.jms.Connection c,
javax.jms.Session s)
|
void |
executeCallback(JmsSenderTemplateCallback callback)
Executes an application-level call-back within the managed session. |
protected void |
executeCallbackInternal(JmsSenderTemplateCallback callback)
|
AtomikosConnectionFactoryBean |
getAtomikosConnectionFactoryBean()
|
int |
getDeliveryMode()
|
javax.jms.Destination |
getDestination()
|
protected String |
getDestinationName()
|
protected abstract javax.jms.Session |
getOrRefreshSession(javax.jms.Connection c)
|
protected abstract javax.jms.Connection |
getOrReuseConnection()
|
int |
getPriority()
|
javax.jms.Destination |
getReplyToDestination()
Gets the replyToDestination. |
protected String |
getReplyToDestinationName()
|
long |
getTimeToLive()
|
String |
getUser()
|
void |
init()
Initializes the session for sending. |
protected javax.jms.Connection |
refreshConnection()
|
void |
sendBytesMessage(byte[] content)
Sends a ByteMessage. |
void |
sendMapMessage(Map content)
Sends a MapMessage. |
void |
sendObjectMessage(Serializable content)
Sends an ObjectMessage. |
void |
sendTextMessage(String content)
Sends a TextMessage. |
void |
setAtomikosConnectionFactoryBean(AtomikosConnectionFactoryBean connectionFactory)
Sets the connection factory to use. |
void |
setDeliveryMode(int i)
Set the deliverymode for messages sent in this session (optional). |
void |
setDestination(javax.jms.Destination destination)
Sets the destination to send to. |
void |
setDestinationName(String destinationName)
Sets the (provider-specific) destination name in order to lookup the destination (rather than providing one directly). |
void |
setPassword(String password)
Set the password for explicit authentication (optional). |
void |
setPriority(int i)
Set the priority for messages sent in this session (optional). |
void |
setReplyToDestination(javax.jms.Destination destination)
If this session is used for sending request/reply messages, then this property indicates the destination where the replies are to be sent (optional). |
void |
setReplyToDestinationName(String replyToDestinationName)
Sets the provider-specific replyToDestinationName. |
void |
setTimeToLive(long l)
Set the time to live for messages sent in this session (optional). |
void |
setUser(String user)
Set the user to use for explicit authentication (optional). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AtomikosConnectionFactoryBean connectionFactoryBean
protected String password
protected javax.jms.Destination destination
protected boolean inited
Constructor Detail |
---|
protected AbstractJmsSenderTemplate()
Method Detail |
---|
protected abstract javax.jms.Session getOrRefreshSession(javax.jms.Connection c) throws javax.jms.JMSException
javax.jms.JMSException
protected abstract javax.jms.Connection getOrReuseConnection() throws javax.jms.JMSException
javax.jms.JMSException
protected abstract void afterUseWithoutErrors(javax.jms.Connection c, javax.jms.Session s) throws javax.jms.JMSException
javax.jms.JMSException
protected abstract void destroy(javax.jms.Connection c, javax.jms.Session s) throws javax.jms.JMSException
javax.jms.JMSException
protected javax.jms.Connection refreshConnection() throws javax.jms.JMSException
javax.jms.JMSException
public void init() throws javax.jms.JMSException
javax.jms.JMSException
public void setAtomikosConnectionFactoryBean(AtomikosConnectionFactoryBean connectionFactory)
connectionFactory
- public AtomikosConnectionFactoryBean getAtomikosConnectionFactoryBean()
public javax.jms.Destination getDestination()
public void setDestinationName(String destinationName)
destinationName
- public void setDestination(javax.jms.Destination destination)
destination
- protected String getDestinationName()
protected String getReplyToDestinationName()
public String getUser()
public void setReplyToDestination(javax.jms.Destination destination)
The replyToDestination should be in the same JMS vendor domain as the send queue. To cross domains, configure a bridge for both the request and the reply channels.
public void setReplyToDestinationName(String replyToDestinationName)
replyToDestinationName
- public javax.jms.Destination getReplyToDestination()
public void setPassword(String password)
password
- The password.public void setUser(String user)
user
- protected void executeCallbackInternal(JmsSenderTemplateCallback callback) throws javax.jms.JMSException
javax.jms.JMSException
public void executeCallback(JmsSenderTemplateCallback callback) throws javax.jms.JMSException
callback
-
javax.jms.JMSException
public int getDeliveryMode()
public int getPriority()
public long getTimeToLive()
public void setDeliveryMode(int i)
- public void setPriority(int i)
- public void setTimeToLive(long l)
- public void sendTextMessage(String content) throws javax.jms.JMSException
content
- The text as a string.
javax.jms.JMSException
public void sendMapMessage(Map content) throws javax.jms.JMSException
content
- The Map to get the content from.
javax.jms.JMSException
public void sendObjectMessage(Serializable content) throws javax.jms.JMSException
content
- The serializable object content.
javax.jms.JMSException
public void sendBytesMessage(byte[] content) throws javax.jms.JMSException
content
- The content as a byte array.
javax.jms.JMSException
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |