Package i5.las2peer.logging.monitoring
Class MonitoringObserver
java.lang.Object
i5.las2peer.logging.monitoring.MonitoringObserver
- All Implemented Interfaces:
NodeObserver
This is the base class of the logging module of las2peer. It sends the collected data to the "Monitoring Data
Processing Service" via the las2peer message concept.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMonitoringObserver
(int messageCache, Node registeredAt) Constructor for the MonitoringObserver. -
Method Summary
Modifier and TypeMethodDescriptionvoid
log
(Long timestamp, MonitoringEvent event, String sourceNode, String sourceAgentId, String destinationNode, String destinationAgentId, String remarks) Processes the incoming data by generating aMonitoringMessage
of it.void
logXESEvent
(Long timestamp, MonitoringEvent event, String sourceNode, String sourceAgentId, String destinationNode, String destinationAgentId, String remarks, String caseId, String activityName, String resourceId, String resourceType, String lifecyclePhase, Long timeOfEvent) Processes the incoming data by generating aXESEventMessage
of it.
-
Field Details
-
DATA_PROCESSING_SERVICE
- See Also:
-
-
Constructor Details
-
MonitoringObserver
Constructor for the MonitoringObserver. Can be added to a node by adding "startObserver" after the bootstrap parameter at theL2pNodeLauncher
. Will be instantiated at aNode
.- Parameters:
messageCache
- determines, how many messages will be stored locally before send to the central collection unit (> 50)registeredAt
- the node this observer is registered at
-
-
Method Details
-
log
public void log(Long timestamp, MonitoringEvent event, String sourceNode, String sourceAgentId, String destinationNode, String destinationAgentId, String remarks) Processes the incoming data by generating aMonitoringMessage
of it. ThisMonitoringMessage
will be stored in an array ofMonitoringMessage
s, which will be send via aMessage
to the Processing Service.- Specified by:
log
in interfaceNodeObserver
- Parameters:
timestamp
- UNIX time stamp of the eventevent
- the event to logsourceNode
- a source (p2p) node of the event (e.g. message sender)sourceAgentId
- a source (las2peer) agent of the event (e.g. message sender)destinationNode
- a destination (p2p) node for the event (e.g. message receiver)destinationAgentId
- a destination (las2peer) agent of the event (e.g. message receiver)remarks
- (optional) additional remarks
-
logXESEvent
public void logXESEvent(Long timestamp, MonitoringEvent event, String sourceNode, String sourceAgentId, String destinationNode, String destinationAgentId, String remarks, String caseId, String activityName, String resourceId, String resourceType, String lifecyclePhase, Long timeOfEvent) Processes the incoming data by generating aXESEventMessage
of it. ThisXESEventMessage
will be stored in an array ofMonitoringMessage
s, which will be send via aMessage
to the Processing Service.- Specified by:
logXESEvent
in interfaceNodeObserver
- Parameters:
timestamp
- UNIX time stamp of the eventevent
- the event to logsourceNode
- a source (p2p) node of the event (e.g. message sender)sourceAgentId
- a source (las2peer) agent of the event (e.g. message sender)destinationNode
- a destination (p2p) node for the event (e.g. message receiver)destinationAgentId
- a destination (las2peer) agent of the event (e.g. message receiver)remarks
- (optional) additional remarkscaseId
- caseId of the eventactivityName
- activityName of the eventresourceId
- resourceId of the eventresourceType
- resourceType of the event
-