public final class Producer extends MessageAdapter implements javax.jms.MessageListener
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoAcknowledge |
protected int |
deliveryMode |
protected int |
priority |
protected javax.jms.TemporaryQueue |
replyQueue |
protected long |
timeToLive |
session
Constructor and Description |
---|
Producer(javax.jms.Session session,
java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> requestMap,
java.util.concurrent.ConcurrentMap<java.lang.String,javax.jms.Message> responseMap,
java.lang.Class<? extends Event> clazz,
javax.jms.MessageProducer producer,
boolean topic) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
onMessage(javax.jms.Message message) |
java.lang.Object |
request(java.lang.String correlationId,
javax.jms.Message message) |
java.lang.Object |
request(java.lang.String correlationId,
javax.jms.Message message,
long timeout) |
<Q extends Event> |
requestAsync(java.lang.String correlationId,
javax.jms.Message message,
long timeout)
Выполнение запроса асинхронно.
|
void |
send(javax.jms.Message message) |
void |
send(javax.jms.Message message,
int priority,
long timeToLive) |
void |
send(javax.jms.Message message,
long timeToLive) |
protected final javax.jms.TemporaryQueue replyQueue
protected final int deliveryMode
protected final int priority
protected final long timeToLive
protected final boolean autoAcknowledge
public Producer(javax.jms.Session session, java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.Object> requestMap, java.util.concurrent.ConcurrentMap<java.lang.String,javax.jms.Message> responseMap, java.lang.Class<? extends Event> clazz, javax.jms.MessageProducer producer, boolean topic) throws javax.jms.JMSException, javax.xml.bind.JAXBException
javax.jms.JMSException
javax.xml.bind.JAXBException
public void onMessage(javax.jms.Message message)
onMessage
in interface javax.jms.MessageListener
public void close() throws javax.jms.JMSException
javax.jms.JMSException
public void send(javax.jms.Message message) throws javax.jms.JMSException
javax.jms.JMSException
public void send(javax.jms.Message message, long timeToLive) throws javax.jms.JMSException
javax.jms.JMSException
public void send(javax.jms.Message message, int priority, long timeToLive) throws javax.jms.JMSException
javax.jms.JMSException
public java.lang.Object request(java.lang.String correlationId, javax.jms.Message message) throws javax.jms.JMSException, java.lang.InterruptedException, javax.xml.bind.JAXBException, EventProcessorException
javax.jms.JMSException
java.lang.InterruptedException
javax.xml.bind.JAXBException
EventProcessorException
public java.lang.Object request(java.lang.String correlationId, javax.jms.Message message, long timeout) throws javax.jms.JMSException, javax.xml.bind.JAXBException, java.lang.InterruptedException, EventProcessorException
javax.jms.JMSException
javax.xml.bind.JAXBException
java.lang.InterruptedException
EventProcessorException
public <Q extends Event> java.util.concurrent.Future<Q> requestAsync(java.lang.String correlationId, javax.jms.Message message, long timeout) throws javax.jms.JMSException, javax.xml.bind.JAXBException, java.lang.InterruptedException, EventProcessorException
Future.cancel(boolean)
!!!Q
- correlationId
- message
- timeout
- javax.jms.JMSException
javax.xml.bind.JAXBException
java.lang.InterruptedException
EventProcessorException