Kieker 1.9

kieker.tools.bridge.connector.jms
Class JMSClientConnector

java.lang.Object
  extended by kieker.tools.bridge.connector.AbstractConnector
      extended by kieker.tools.bridge.connector.jms.JMSClientConnector
All Implemented Interfaces:
IServiceConnector
Direct Known Subclasses:
JMSEmbeddedConnector

public class JMSClientConnector
extends AbstractConnector

Implements a connector for JMS which supports text and binary messages.

Since:
1.8
Author:
Reiner Jung

Field Summary
static String KIEKER_DATA_BRIDGE_READ_QUEUE
          Default KDB queue name.
static String PASSWORD
          Property name for the configuration password property.
static String URI
          Property name for the configuration service URI property.
static String USERNAME
          Property name for the configuration user name property.
 
Constructor Summary
JMSClientConnector(Configuration configuration, ConcurrentMap<Integer,LookupEntity> lookupEntityMap)
          Create a JMSClientConnector.
 
Method Summary
 void close()
          Close the JMS connection.
 IMonitoringRecord deserializeNextRecord()
          Fetch a text or binary message from the JMS queue and use the correct deserializer for the received message.
 void initialize()
          Initialize the JMS connection to read from a JMS queue.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USERNAME

public static final String USERNAME
Property name for the configuration user name property.


PASSWORD

public static final String PASSWORD
Property name for the configuration password property.


URI

public static final String URI
Property name for the configuration service URI property.


KIEKER_DATA_BRIDGE_READ_QUEUE

public static final String KIEKER_DATA_BRIDGE_READ_QUEUE
Default KDB queue name.

See Also:
Constant Field Values
Constructor Detail

JMSClientConnector

public JMSClientConnector(Configuration configuration,
                          ConcurrentMap<Integer,LookupEntity> lookupEntityMap)
Create a JMSClientConnector.

Parameters:
configuration - Kieker configuration including setup for connectors
lookupEntityMap - IMonitoringRecord constructor and TYPES-array to id map
Throws:
ConnectorDataTransmissionException
Method Detail

initialize

public void initialize()
                throws ConnectorDataTransmissionException
Initialize the JMS connection to read from a JMS queue.

Throws:
ConnectorDataTransmissionException - if any JMSException occurs

close

public void close()
           throws ConnectorDataTransmissionException
Close the JMS connection.

Throws:
ConnectorDataTransmissionException - if any JMSException occurs

deserializeNextRecord

public IMonitoringRecord deserializeNextRecord()
                                        throws ConnectorDataTransmissionException,
                                               ConnectorEndOfDataException
Fetch a text or binary message from the JMS queue and use the correct deserializer for the received message.

Returns:
One new IMonitoringRecord
Throws:
ConnectorDataTransmissionException - if the message type is neither binary nor text, or if a JMSException occurs
ConnectorEndOfDataException - if the received message is null indicating that the consumer is closed

Kieker 1.9

Copyright 2014 Kieker Project, http://kieker-monitoring.net