Class Producer

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
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 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

    Constructors
    Constructor
    Description
    Producer(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 Type
    Method
    Description
    void
     
    void
    onMessage(javax.jms.Message message)
     
    request(String correlationId, javax.jms.Message message)
     
    request(String correlationId, javax.jms.Message message, long timeout)
     
    <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)
     

    Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

    getLogger, logError

    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, ConcurrentMap<String,Object> requestMap, ConcurrentMap<String,javax.jms.Message> responseMap, Class<? extends ru.bitel.bgbilling.kernel.event.common.Event> clazz, String name, boolean topic) throws javax.jms.JMSException, jakarta.xml.bind.JAXBException
      Throws:
      javax.jms.JMSException
      jakarta.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 Object request(String correlationId, javax.jms.Message message) throws javax.jms.JMSException, InterruptedException, jakarta.xml.bind.JAXBException, EventProcessorException
      Throws:
      javax.jms.JMSException
      InterruptedException
      jakarta.xml.bind.JAXBException
      EventProcessorException
    • request

      public Object request(String correlationId, javax.jms.Message message, long timeout) throws javax.jms.JMSException, jakarta.xml.bind.JAXBException, InterruptedException, EventProcessorException
      Throws:
      javax.jms.JMSException
      jakarta.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, jakarta.xml.bind.JAXBException, InterruptedException, EventProcessorException
      Выполнение запроса асинхронно.
      Если ответ не пришел, обязательно должен быть обязательно вызван Future.cancel(boolean)!!!
      Type Parameters:
      Q -
      Parameters:
      correlationId -
      message -
      timeout -
      Returns:
      Throws:
      javax.jms.JMSException
      jakarta.xml.bind.JAXBException
      InterruptedException
      EventProcessorException