Class JmsConnection
java.lang.Object
com.northconcepts.datapipeline.core.DataObject
com.northconcepts.datapipeline.jms.JmsConnection
A connection to Java Message Service (JMS) provider.
-
Field Summary
Fields inherited from class com.northconcepts.datapipeline.core.DataObject
id, log, name, TIMESTAMP_FORMAT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExceptionProperties(DataException exception) Adds this object's current state to aDataException.voidclose()ConnectionReturns the underlying JMS connection or null beforeopen()is called.DestinationReturns the queue or topic named in the settings or null beforeopen()is called.SessionReturns the JMS session or null beforeopen()is called.voidopen()Connects using the connection factory looked up through JNDI with the settings' properties and creates the session and destination; callstart()afterwards to begin receiving messages.voidstart()Starts the connection so messages can be received; only valid afteropen().voidstop()Stops the connection, first unsubscribing the durable subscription named by the settings' client ID if one is set.
-
Constructor Details
-
JmsConnection
-
-
Method Details
-
getConnection
public Connection getConnection()Returns the underlying JMS connection or null beforeopen()is called. -
getSession
public Session getSession()Returns the JMS session or null beforeopen()is called. -
getDestination
public Destination getDestination()Returns the queue or topic named in the settings or null beforeopen()is called. -
open
Connects using the connection factory looked up through JNDI with the settings' properties and creates the session and destination; callstart()afterwards to begin receiving messages.- Throws:
DataException
-
close
- Throws:
DataException
-
addExceptionProperties
Description copied from class:DataObjectAdds this object's current state to aDataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.- Overrides:
addExceptionPropertiesin classDataObject
-
start
Starts the connection so messages can be received; only valid afteropen().- Throws:
Throwable
-
stop
Stops the connection, first unsubscribing the durable subscription named by the settings' client ID if one is set.- Throws:
Throwable
-