Package ru.bitel.bgbilling.kernel.event
Class Producer
java.lang.Object
ru.bitel.bgbilling.kernel.event.MessageAdapter
ru.bitel.bgbilling.kernel.event.Producer
- All Implemented Interfaces:
javax.jms.MessageListener
Отсыльщик сообщения.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
protected final int
protected final int
protected final javax.jms.TemporaryQueue
protected final long
Fields inherited from class ru.bitel.bgbilling.kernel.event.MessageAdapter
session
-
Constructor Summary
ConstructorDescriptionProducer
(javax.jms.Session session, ConcurrentMap<String, Object> requestMap, ConcurrentMap<String, javax.jms.Message> responseMap, Class<? extends ru.bitel.bgbilling.kernel.event.common.Event> clazz, String name, boolean topic) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
onMessage
(javax.jms.Message message) <Q extends ru.bitel.bgbilling.kernel.event.common.Event>
Future<Q>requestAsync
(String correlationId, javax.jms.Message message, long timeout) Выполнение запроса асинхронно.
Если ответ не пришел, обязательно должен быть обязательно вызванFuture.cancel(boolean)
!!!void
send
(javax.jms.Message message) void
send
(javax.jms.Message message, int priority, long timeToLive) void
send
(javax.jms.Message message, long timeToLive)
-
Field Details
-
replyQueue
protected final javax.jms.TemporaryQueue replyQueue -
deliveryMode
protected final int deliveryMode -
priority
protected final int priority -
timeToLive
protected final long timeToLive -
autoAcknowledge
protected final boolean autoAcknowledge
-
-
Constructor Details
-
Producer
public Producer(javax.jms.Session session, ConcurrentMap<String, Object> requestMap, ConcurrentMap<String, throws javax.jms.JMSException, javax.xml.bind.JAXBExceptionjavax.jms.Message> responseMap, Class<? extends ru.bitel.bgbilling.kernel.event.common.Event> clazz, String name, boolean topic) - Throws:
javax.jms.JMSException
javax.xml.bind.JAXBException
-
-
Method Details
-
onMessage
public void onMessage(javax.jms.Message message) - Specified by:
onMessage
in interfacejavax.jms.MessageListener
-
close
public void close() throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
send
public void send(javax.jms.Message message) throws javax.jms.JMSException - Throws:
javax.jms.JMSException
-
send
public void send(javax.jms.Message message, long timeToLive) throws javax.jms.JMSException - Throws:
javax.jms.JMSException
-
send
public void send(javax.jms.Message message, int priority, long timeToLive) throws javax.jms.JMSException - Throws:
javax.jms.JMSException
-
request
public Object request(String correlationId, javax.jms.Message message) throws javax.jms.JMSException, InterruptedException, javax.xml.bind.JAXBException, EventProcessorException - Throws:
javax.jms.JMSException
InterruptedException
javax.xml.bind.JAXBException
EventProcessorException
-
request
public Object request(String correlationId, javax.jms.Message message, long timeout) throws javax.jms.JMSException, javax.xml.bind.JAXBException, InterruptedException, EventProcessorException - Throws:
javax.jms.JMSException
javax.xml.bind.JAXBException
InterruptedException
EventProcessorException
-
requestAsync
public <Q extends ru.bitel.bgbilling.kernel.event.common.Event> Future<Q> requestAsync(String correlationId, javax.jms.Message message, long timeout) throws javax.jms.JMSException, javax.xml.bind.JAXBException, InterruptedException, EventProcessorException Выполнение запроса асинхронно.
Если ответ не пришел, обязательно должен быть обязательно вызванFuture.cancel(boolean)
!!!- Type Parameters:
Q
-- Parameters:
correlationId
-message
-timeout
-- Returns:
- Throws:
javax.jms.JMSException
javax.xml.bind.JAXBException
InterruptedException
EventProcessorException
-