public class JMSMessageSender extends Object
Constructor and Description |
---|
JMSMessageSender(Connection connection,
Session session,
MessageProducer producer,
Destination destination,
int cacheLevel,
boolean jmsSpec11,
Boolean isQueue)
This is a low-end method to support the one-time sends using JMS 1.0.2b
|
JMSMessageSender(JMSConnectionFactory jmsConnectionFactory,
String targetAddress)
Create a JMSSender using a JMSConnectionFactory and target EPR
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close non-shared producer, session and connection if any
|
int |
getCacheLevel() |
Connection |
getConnection() |
MessageProducer |
getProducer() |
Session |
getSession() |
void |
send(Message message,
MessageContext msgCtx)
Perform actual send of JMS message to the Destination selected
|
void |
setCacheLevel(int cacheLevel) |
void |
setConnection(Connection connection) |
void |
setProducer(MessageProducer producer) |
void |
setSession(Session session) |
public JMSMessageSender(Connection connection, Session session, MessageProducer producer, Destination destination, int cacheLevel, boolean jmsSpec11, Boolean isQueue)
connection
- the JMS Connectionsession
- JMS Sessionproducer
- the MessageProducerdestination
- the JMS DestinationcacheLevel
- cacheLevel - None | Connection | Session | ProducerjmsSpec11
- true if the JMS 1.1 API should be usedisQueue
- posting to a Queue?public JMSMessageSender(JMSConnectionFactory jmsConnectionFactory, String targetAddress)
jmsConnectionFactory
- the JMSConnectionFactorytargetAddress
- target EPRpublic void send(Message message, MessageContext msgCtx)
message
- the JMS messagemsgCtx
- the Axis2 MessageContextpublic void close()
public void setConnection(Connection connection)
public void setSession(Session session)
public void setProducer(MessageProducer producer)
public void setCacheLevel(int cacheLevel)
public int getCacheLevel()
public Connection getConnection()
public MessageProducer getProducer()
public Session getSession()
Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.