|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.jms.JmsObject toolbox.jms.JmsProducerImpl
public class JmsProducerImpl
Default JmsProducer
implementation. This implementation
provides queue sender and topic publisher functionalities.
Field Summary |
---|
Fields inherited from class toolbox.jms.JmsObject |
---|
m_exposeContext, m_jndiConfig |
Constructor Summary | |
---|---|
JmsProducerImpl()
Default constructor. |
Method Summary | |
---|---|
javax.jms.Message |
createMessage(int type)
Create a message of the specified type. |
void |
destroy()
Destroy this producer. |
void |
init(java.lang.String name,
java.util.Map props,
javax.jms.ExceptionListener exLsnr)
Initialise this producer with the given name identifier and configuration properties. |
java.lang.String |
send(javax.jms.Message msg)
Send the given message using this producer. |
java.lang.String |
send(javax.jms.Message msg,
javax.jms.Destination destination)
Send the given message using this producer. |
void |
setMessageListener(javax.jms.MessageListener listener)
Use this MessageListener to receive replies. |
void |
start()
Tell the reply consumer to start listening. |
void |
stop()
Tell the reply consumer to stop listening. |
Methods inherited from class toolbox.jms.JmsObject |
---|
destroyObject, getConnection, getDestination, getName, getSession, getType, initObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface toolbox.jms.JmsProducer |
---|
getName |
Constructor Detail |
---|
public JmsProducerImpl()
Method Detail |
---|
public void init(java.lang.String name, java.util.Map props, javax.jms.ExceptionListener exLsnr) throws JmsException
props
map:
javax.jms.MessageListener
implementation.
(optional).
init
in interface JmsProducer
name
- String containing the name identifier of this producer.props
- Map instance containing the configuration
for this producer.exLsnr
- ExceptionListener instance that this producer must use
to monitor it's broker connection.
JmsException
- if the producer cannot be initialised.public javax.jms.Message createMessage(int type) throws JmsException
createMessage
in interface JmsProducer
type
- int indicating the type of message. Refer to
JmsConstants
.
JmsException
- if the message cannot be created.public java.lang.String send(javax.jms.Message msg) throws JmsException
send
in interface JmsProducer
msg
- Message instance to send.
JmsException
- if the message cannot be sent.public java.lang.String send(javax.jms.Message msg, javax.jms.Destination destination) throws JmsException
send
in interface JmsProducer
msg
- Message instance to send.destination
- Use this destination as the target queue or topic.
JmsException
- if the message cannot be sent.public void setMessageListener(javax.jms.MessageListener listener)
setMessageListener
in interface JmsProducer
listener
- MessageListener that must be used.public void start() throws JmsException
start
in interface JmsProducer
JmsException
public void stop() throws JmsException
stop
in interface JmsProducer
JmsException
public void destroy()
destroy
in interface JmsProducer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |