Class JmsConnectionHandler

java.lang.Object
org.bedework.sysevents.JmsConnectionHandler
All Implemented Interfaces:
Serializable, JmsDefs, org.bedework.util.logging.Logged

public class JmsConnectionHandler extends Object implements org.bedework.util.logging.Logged, JmsDefs
This is a class to ease setting up of JMS connections..
Author:
Mike Douglass douglm - rpi.edu
See Also:
  • Constructor Details

    • JmsConnectionHandler

      public JmsConnectionHandler()
  • Method Details

    • open

      public void open(String queueName) throws NotificationException
      Open a connection to the named queue ready to create a producer or consumer.
      Parameters:
      queueName - the queue
      Throws:
      NotificationException - on fatal JMS error
    • open

      public void open(String queueName, Properties pr) throws NotificationException
      Open a connection to the named queue ready to create a producer or consumer.
      Parameters:
      queueName - the queue
      pr - propeties
      Throws:
      NotificationException - on fatal JMS error
    • close

      public void close()
    • getSession

      public javax.jms.Session getSession()
      Returns:
      jms session
    • getProducer

      public javax.jms.MessageProducer getProducer() throws NotificationException
      Returns:
      a message producer
      Throws:
      NotificationException - on fatal JMS error
    • getConsumer

      public javax.jms.MessageConsumer getConsumer() throws NotificationException
      Returns:
      a message consumer
      Throws:
      NotificationException - on fatal JMS error
    • receive

      public javax.jms.Message receive() throws NotificationException
      Returns:
      next message
      Throws:
      NotificationException - on fatal JMS error
    • getLogger

      public org.bedework.util.logging.BwLogger getLogger()
      Specified by:
      getLogger in interface org.bedework.util.logging.Logged