|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object toolbox.jms.JmsObject toolbox.jms.JmsConsumerImpl
public class JmsConsumerImpl
Default JmsConsumer
implementation.
This implementation provides Queue receiver and Topic subscriber
functionalities.
Field Summary |
---|
Fields inherited from class toolbox.jms.JmsObject |
---|
m_exposeContext, m_jndiConfig |
Constructor Summary | |
---|---|
JmsConsumerImpl()
Default constructor. |
Method Summary | |
---|---|
void |
destroy()
Destroy this consumer. |
void |
init(java.lang.String name,
java.util.Map props,
javax.jms.ExceptionListener exLsnr)
Initialise this consumer with the given name identifier and configuration properties. |
javax.jms.Message |
receive()
Use this method to receive messages when no listener was specified for this consumer in point_to_point mode. |
void |
setMessageListener(javax.jms.MessageListener listener)
Set the message listener that must be used by this consumer to process messages. |
void |
start()
Tell this consumer to start listening. |
void |
stop()
Tell this 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.JmsConsumer |
---|
getName |
Constructor Detail |
---|
public JmsConsumerImpl()
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 JmsConsumer
name
- String containing the name identifier of this consumer.props
- Map instance containing the configuration
for this consumer.exLsnr
- ExceptionListener instance that this producer must use
to monitor it's broker connection.
JmsException
- if the consumer cannot be initialised.public void start() throws JmsException
start
in interface JmsConsumer
JmsException
public void stop() throws JmsException
stop
in interface JmsConsumer
JmsException
public void setMessageListener(javax.jms.MessageListener listener)
setMessageListener
in interface JmsConsumer
listener
- MessageListener implementation that must be used to
process messages.public javax.jms.Message receive() throws JmsException
receive
in interface JmsConsumer
JmsException
- if the message could not be consumed.public void destroy()
destroy
in interface JmsConsumer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |