Class MonitoringObserver

java.lang.Object
i5.las2peer.logging.monitoring.MonitoringObserver
All Implemented Interfaces:
NodeObserver

public class MonitoringObserver extends Object implements 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 Details

  • Constructor Details

    • MonitoringObserver

      public MonitoringObserver(int messageCache, Node registeredAt)
      Constructor for the MonitoringObserver. Can be added to a node by adding "startObserver" after the bootstrap parameter at the L2pNodeLauncher. Will be instantiated at a Node.
      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 a MonitoringMessage of it. This MonitoringMessage will be stored in an array of MonitoringMessages, which will be send via a Message to the Processing Service.
      Specified by:
      log in interface NodeObserver
      Parameters:
      timestamp - UNIX time stamp of the event
      event - the event to log
      sourceNode - 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 a XESEventMessage of it. This XESEventMessage will be stored in an array of MonitoringMessages, which will be send via a Message to the Processing Service.
      Specified by:
      logXESEvent in interface NodeObserver
      Parameters:
      timestamp - UNIX time stamp of the event
      event - the event to log
      sourceNode - 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
      caseId - caseId of the event
      activityName - activityName of the event
      resourceId - resourceId of the event
      resourceType - resourceType of the event