Package org.bedework.util.jms
Class JmsConnectionHandler
- java.lang.Object
-
- org.bedework.util.jms.JmsConnectionHandler
-
- All Implemented Interfaces:
org.bedework.util.logging.Logged
public class JmsConnectionHandler extends Object implements org.bedework.util.logging.Logged
This is a class to ease setting up of JMS connections..- Author:
- Mike Douglass
-
-
Field Summary
Fields Modifier and Type Field Description static intackModestatic booleanuseTransactions
-
Constructor Summary
Constructors Constructor Description JmsConnectionHandler(Properties pr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()javax.jms.MessageConsumergetConsumer()org.bedework.util.logging.BwLoggergetLogger()javax.jms.MessageProducergetProducer()javax.jms.SessiongetSession()voidopen(String queueName)Open a connection to the named queue ready to create a producer or consumer.javax.jms.Messagereceive()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, warn
-
-
-
-
Field Detail
-
ackMode
public static int ackMode
-
useTransactions
public static final boolean useTransactions
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JmsConnectionHandler
public JmsConnectionHandler(Properties pr)
-
-
Method Detail
-
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 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 error
-
getConsumer
public javax.jms.MessageConsumer getConsumer() throws NotificationException- Returns:
- a message consumer
- Throws:
NotificationException- on fatal error
-
receive
public javax.jms.Message receive() throws NotificationException- Returns:
- next message
- Throws:
NotificationException- on fatal error
-
getLogger
public org.bedework.util.logging.BwLogger getLogger()
- Specified by:
getLoggerin interfaceorg.bedework.util.logging.Logged
-
-