public class ServiceContainer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
active
Is true when the service is running.
|
static long |
DEFAULT_LISTENER_UPDATE_INTERVAL
Update interval for the process listener.
|
Constructor and Description |
---|
ServiceContainer(Configuration configuration,
IServiceConnector service,
boolean respawn) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(IServiceListener listener)
Add an update state listener.
|
long |
getRecordCount() |
boolean |
isRespawn() |
void |
run()
Main loop of the Kieker bridge.
|
void |
setListenerUpdateInterval(long listenerUpdateInterval)
Set the update interval for the listener information.
|
void |
shutdown()
Safely end bridge loop.
|
public static final long DEFAULT_LISTENER_UPDATE_INTERVAL
protected volatile boolean active
public ServiceContainer(Configuration configuration, IServiceConnector service, boolean respawn)
configuration
- A configuration object for Kieker monitoringservice
- A service component to handle incoming datarespawn
- Respawn the connector if it fails (this construct is debatable it should be handled by the connector
itself)public void run() throws ConnectorDataTransmissionException
ConnectorDataTransmissionException
- if deserializeNextRecord exits with a ConnectorDataTransmissionExceptionpublic void shutdown() throws ConnectorDataTransmissionException
ConnectorDataTransmissionException
- An error occurred during data transmission and in this particular case while closing the data
transmission.public void addListener(IServiceListener listener)
listener
- an object implementing the IServiceListener interfacepublic void setListenerUpdateInterval(long listenerUpdateInterval)
listenerUpdateInterval
- the new update interval in number of recordspublic long getRecordCount()
public boolean isRespawn()
Copyright 2017 Kieker Project, http://kieker-monitoring.net