public abstract class AbstractJmsSenderTemplate extends java.lang.Object implements JmsSenderTemplate
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractJmsSenderTemplate() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
afterUseWithoutErrors(javax.jms.Connection c,
javax.jms.Session s) |
void |
close()
Closes all resources.
|
protected 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 java.lang.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 java.lang.String |
getReplyToDestinationName() |
long |
getTimeToLive() |
java.lang.String |
getUser() |
void |
init()
Initializes the session for sending.
|
protected javax.jms.Connection |
refreshConnection() |
void |
sendBytesMessage(byte[] content)
Sends a ByteMessage.
|
void |
sendMapMessage(java.util.Map content)
Sends a MapMessage.
|
void |
sendObjectMessage(java.io.Serializable content)
Sends an ObjectMessage.
|
void |
sendTextMessage(java.lang.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(java.lang.String destinationName)
Sets the (provider-specific) destination name in order
to lookup the destination (rather than providing one directly).
|
void |
setPassword(java.lang.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(java.lang.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(java.lang.String user)
Set the user to use for explicit authentication (optional).
|
protected abstract javax.jms.Session getOrRefreshSession(javax.jms.Connection c)
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected abstract javax.jms.Connection getOrReuseConnection()
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected abstract void afterUseWithoutErrors(javax.jms.Connection c,
javax.jms.Session s)
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected void destroy(javax.jms.Connection c,
javax.jms.Session s)
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected javax.jms.Connection refreshConnection()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void init()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void setAtomikosConnectionFactoryBean(AtomikosConnectionFactoryBean connectionFactory)
connectionFactory - public AtomikosConnectionFactoryBean getAtomikosConnectionFactoryBean()
public javax.jms.Destination getDestination()
public void setDestinationName(java.lang.String destinationName)
destinationName - public void setDestination(javax.jms.Destination destination)
destination - protected java.lang.String getDestinationName()
protected java.lang.String getReplyToDestinationName()
public java.lang.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(java.lang.String replyToDestinationName)
replyToDestinationName - public javax.jms.Destination getReplyToDestination()
public void setPassword(java.lang.String password)
password - The password.public void setUser(java.lang.String user)
user - protected void executeCallbackInternal(JmsSenderTemplateCallback callback) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void executeCallback(JmsSenderTemplateCallback callback) throws javax.jms.JMSException
JmsSenderTemplateexecuteCallback in interface JmsSenderTemplatejavax.jms.JMSExceptionpublic 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(java.lang.String content)
throws javax.jms.JMSException
JmsSenderTemplatesendTextMessage in interface JmsSenderTemplatecontent - The text as a string.javax.jms.JMSExceptionpublic void sendMapMessage(java.util.Map content)
throws javax.jms.JMSException
JmsSenderTemplatesendMapMessage in interface JmsSenderTemplatecontent - The Map to get the content from.javax.jms.JMSExceptionpublic void sendObjectMessage(java.io.Serializable content)
throws javax.jms.JMSException
JmsSenderTemplatesendObjectMessage in interface JmsSenderTemplatecontent - The serializable object content.javax.jms.JMSExceptionpublic void sendBytesMessage(byte[] content)
throws javax.jms.JMSException
JmsSenderTemplatesendBytesMessage in interface JmsSenderTemplatecontent - The content as a byte array.javax.jms.JMSExceptionpublic void close()
Copyright © 2018. All Rights Reserved.