Class Producer
- java.lang.Object
-
- org.gcube.dataanalysis.executor.messagequeue.Producer
-
public class Producer extends Object
-
-
Field Summary
Fields Modifier and Type Field Description StringidentifierQueueManagermanagerjavax.jms.MessageProducerproducerStringtopic
-
Constructor Summary
Constructors Constructor Description Producer(QueueManager manager, String topic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseSession()voidsendMessage(Object toSend, long timeToLive)voidsendTextMessage(String text, long timeToLive)voidstandBy()voidstop()voidwake()
-
-
-
Field Detail
-
producer
public javax.jms.MessageProducer producer
-
manager
public QueueManager manager
-
topic
public String topic
-
identifier
public String identifier
-
-
Constructor Detail
-
Producer
public Producer(QueueManager manager, String topic) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
-
Method Detail
-
sendTextMessage
public void sendTextMessage(String text, long timeToLive) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
sendMessage
public void sendMessage(Object toSend, long timeToLive) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
standBy
public void standBy() throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
stop
public void stop() throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
closeSession
public void closeSession() throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
-