Class Producer

java.lang.Object
ru.bitel.bgbilling.kernel.event.MessageAdapter
ru.bitel.bgbilling.kernel.event.Producer
All Implemented Interfaces:
javax.jms.MessageListener

public final class Producer
extends MessageAdapter
implements javax.jms.MessageListener
Отсыльщик сообщения.
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected boolean autoAcknowledge  
    protected int deliveryMode  
    protected int priority  
    protected javax.jms.TemporaryQueue replyQueue  
    protected long timeToLive  

    Fields inherited from class ru.bitel.bgbilling.kernel.event.MessageAdapter

    session
  • Constructor Summary

    Constructors
    Constructor 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 ru.bitel.bgbilling.kernel.event.common.Event> clazz, java.lang.String name, boolean topic)  
  • Method Summary

    Modifier and Type Method 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 ru.bitel.bgbilling.kernel.event.common.Event>
    java.util.concurrent.Future<Q>
    requestAsync​(java.lang.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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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, 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 ru.bitel.bgbilling.kernel.event.common.Event> clazz, java.lang.String name, boolean topic) throws javax.jms.JMSException, javax.xml.bind.JAXBException
      Throws:
      javax.jms.JMSException
      javax.xml.bind.JAXBException
  • Method Details

    • onMessage

      public void onMessage​(javax.jms.Message message)
      Specified by:
      onMessage in interface javax.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 java.lang.Object request​(java.lang.String correlationId, javax.jms.Message message) throws javax.jms.JMSException, java.lang.InterruptedException, javax.xml.bind.JAXBException, EventProcessorException
      Throws:
      javax.jms.JMSException
      java.lang.InterruptedException
      javax.xml.bind.JAXBException
      EventProcessorException
    • request

      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
      Throws:
      javax.jms.JMSException
      javax.xml.bind.JAXBException
      java.lang.InterruptedException
      EventProcessorException
    • requestAsync

      public <Q extends ru.bitel.bgbilling.kernel.event.common.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)!!!
      Type Parameters:
      Q -
      Parameters:
      correlationId -
      message -
      timeout -
      Returns:
      Throws:
      javax.jms.JMSException
      javax.xml.bind.JAXBException
      java.lang.InterruptedException
      EventProcessorException