Kieker 1.12

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 java.lang.String FACTORY_LOOKUP_NAME
          Property name for the configuration of the JMS connector.
static java.lang.String KIEKER_DATA_BRIDGE_READ_QUEUE
          Default KDB queue name.
protected  java.lang.String password
          password used to connect to the JMS service.
static java.lang.String PASSWORD
          Property name for the configuration password property.
static java.lang.String URI
          Property name for the configuration service URI property.
protected  java.lang.String username
          username used to connect to the JMS service.
static java.lang.String USERNAME
          Property name for the configuration user name property.
 
Fields inherited from class kieker.tools.bridge.connector.AbstractConnector
configuration, lookupEntityMap
 
Constructor Summary
JMSClientConnector(Configuration configuration, java.util.concurrent.ConcurrentMap<java.lang.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USERNAME

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


PASSWORD

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


URI

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


FACTORY_LOOKUP_NAME

public static final java.lang.String FACTORY_LOOKUP_NAME
Property name for the configuration of the JMS connector.


KIEKER_DATA_BRIDGE_READ_QUEUE

public static final java.lang.String KIEKER_DATA_BRIDGE_READ_QUEUE
Default KDB queue name.

See Also:
Constant Field Values

username

protected final java.lang.String username
username used to connect to the JMS service.


password

protected final java.lang.String password
password used to connect to the JMS service.

Constructor Detail

JMSClientConnector

public JMSClientConnector(Configuration configuration,
                          java.util.concurrent.ConcurrentMap<java.lang.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.12

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