Class JMSReader
java.lang.Object
kieker.analysis.generic.source.jms.JMSReader
public final class JMSReader
extends java.lang.Object
Reads monitoring records from a (remote or local) JMS queue.
- Since:
- 0.95a
- Author:
- Andre van Hoorn, Matthias Rohr, Lars Bluemke
-
Constructor Summary
Constructors Constructor Description JMSReader(java.lang.String jmsProviderUrl, java.lang.String jmsDestination, java.lang.String jmsFactoryLookupName, java.util.function.Consumer<IMonitoringRecord> elementReceivedCallback)
Creates a new logic module for the Consumer. -
Method Summary
-
Constructor Details
-
JMSReader
public JMSReader(java.lang.String jmsProviderUrl, java.lang.String jmsDestination, java.lang.String jmsFactoryLookupName, java.util.function.Consumer<IMonitoringRecord> elementReceivedCallback) throws AnalysisConfigurationExceptionCreates a new logic module for the Consumer.- Parameters:
jmsProviderUrl
- The name of the configuration determining the JMS provider URL, e.g.tcp://localhost:3035/
jmsDestination
- The name of the configuration determining the JMS destination, e.g.queue1
.jmsFactoryLookupName
- The name of the configuration determining the name of the used JMS factory, e.g.org.exolab.jms.jndi.InitialContextFactory
.elementReceivedCallback
- The actual teetime stage which uses this class.- Throws:
AnalysisConfigurationException
- If one of the properties is empty.
-
-
Method Details
-
read
public boolean read()Starts the reader. This method is intended to be a blocking operation, i.e., it is assumed that reading has finished before this method returns. The method should indicate an error by the return value false. In asynchronous scenarios, theterminate()
method can be used to initiate the termination of this method.- Returns:
- true if reading was successful; false if an error occurred
-
terminate
public void terminate()Terminates the reader logic and returns iff termination was successful.
-