Kieker 1.4

kieker.analysis.reader.jms
Class JMSReader

java.lang.Object
  extended by kieker.analysis.reader.AbstractMonitoringReader
      extended by kieker.analysis.reader.jms.JMSReader
All Implemented Interfaces:
IMonitoringReader

public class JMSReader
extends AbstractMonitoringReader

Reads monitoring records from a (remote or local) JMS queue.

Author:
Andre van Hoorn, Matthias Rohr

Constructor Summary
JMSReader()
          Constructor for JMSReader.
JMSReader(String jmsProviderUrl, String jmsDestination, String jmsFactoryLookupName)
           
 
Method Summary
 boolean init(String initString)
          Valid key/value pair: jmsProviderUrl=tcp://localhost:3035/ | jmsDestination=queue1 | jmsFactoryLookupName=org.exolab.jms.jndi.InitialContextFactory
 boolean read()
          A call to this method is a blocking call.
 void terminate()
          Initiates a termination of the reader.
 
Methods inherited from class kieker.analysis.reader.AbstractMonitoringReader
addRecordReceiver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSReader

public JMSReader(String jmsProviderUrl,
                 String jmsDestination,
                 String jmsFactoryLookupName)
Parameters:
jmsProviderUrl - = for instance "tcp://127.0.0.1:3035/"
jmsDestination - = for instance "queue1"
jmsFactoryLookupName - = for instance "org.exolab.jms.jndi.InitialContextFactory" (OpenJMS)
Throws:
IllegalArgumentException - if passed parameters are null or empty.

JMSReader

public JMSReader()
Constructor for JMSReader. Requires a subsequent call to the init method.

Method Detail

init

public boolean init(String initString)
Valid key/value pair: jmsProviderUrl=tcp://localhost:3035/ | jmsDestination=queue1 | jmsFactoryLookupName=org.exolab.jms.jndi.InitialContextFactory

Parameters:
initString - the initialization string
Returns:
true if the initialization was successful; false if an error occurred

read

public boolean read()
A call to this method is a blocking call.

Returns:
true if reading was successful; false if an error occurred

terminate

public void terminate()
Description copied from interface: IMonitoringReader
Initiates a termination of the reader. This method is only used by the framework and should not be called manually to register a receiver. Use the method AnalysisController.terminate() instead. After receiving this notification, the reader should terminate its IMonitoringReader.read() method.


Kieker 1.4

Copyright 2011 the Kieker Project, http://kieker.sourceforge.net