Class TcpProbeController

java.lang.Object
kieker.analysis.architecture.adaptation.TcpProbeController
All Implemented Interfaces:
IProbeController

public class TcpProbeController
extends java.lang.Object
implements IProbeController
Controller to send remote control events for probes to given addresses. Establishes TCP connections and keeps them open. Please note that this feature interacts with monitoring probes over an un-encrypted and insecure connection.
Since:
1.15
Author:
Marc Adolf
  • Constructor Summary

    Constructors 
    Constructor Description
    TcpProbeController()
    Create the probe controller.
  • Method Summary

    Modifier and Type Method Description
    void activateOperationMonitoring​(java.lang.String ip, int port, java.lang.String hostname, java.lang.String operationSignature)
    Activates monitoring of a method on one monitored application via TCP.
    void activateOperationMonitoringWithParameters​(java.lang.String ip, int port, java.lang.String hostname, java.lang.String operationSignature, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> parameters)
    Activates monitoring of a method on one monitored application via TCP and transfers parameter.
    void controlProbe​(BasicTcpControlEvent event)
    Convenience method for BasicTcpControlEvent control events.
    void deactivateOperationMonitoring​(java.lang.String ip, int port, java.lang.String serviceComponent, java.lang.String operationSignature)
    Deactivates monitoring of a method on one monitored application via TCP.
    boolean isKnownHost​(java.lang.String ip, int port)
    Checks if a host is known.
    void updateProbeParameter​(java.lang.String ip, int port, java.lang.String hostname, java.lang.String pattern, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> parameters)
    Updates the given parameters for a probe.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • controlProbe

      public void controlProbe​(BasicTcpControlEvent event) throws RemoteControlFailedException
      Convenience method for BasicTcpControlEvent control events.
      Specified by:
      controlProbe in interface IProbeController
      Parameters:
      event - The event that contains the information for remote control
      Throws:
      RemoteControlFailedException - if the connection can not be established within a set timeout.
    • updateProbeParameter

      public void updateProbeParameter​(java.lang.String ip, int port, java.lang.String hostname, java.lang.String pattern, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> parameters) throws RemoteControlFailedException
      Updates the given parameters for a probe.
      Parameters:
      ip - Address of the monitored application.
      port - Port of the TCP controller.
      hostname - The name of the component which is using this IP and port.
      pattern - The pattern of the method that should is monitored.
      parameters - The map of parameters to be set, the key is the name and the values the values for the parameter.
      Throws:
      RemoteControlFailedException - if the connection can not be established within a set timeout.
    • activateOperationMonitoring

      public void activateOperationMonitoring​(java.lang.String ip, int port, java.lang.String hostname, java.lang.String operationSignature) throws RemoteControlFailedException
      Activates monitoring of a method on one monitored application via TCP.
      Parameters:
      ip - Address of the monitored application.
      port - Port of the TCP controller.
      hostname - The name of the component which is using this IP and port.
      operationSignature - The operation signature of the method that should be monitored.
      Throws:
      RemoteControlFailedException - if the connection can not be established within a set timeout.
    • activateOperationMonitoringWithParameters

      public void activateOperationMonitoringWithParameters​(java.lang.String ip, int port, java.lang.String hostname, java.lang.String operationSignature, java.util.Map<java.lang.String,​java.util.List<java.lang.String>> parameters) throws RemoteControlFailedException
      Activates monitoring of a method on one monitored application via TCP and transfers parameter.
      Parameters:
      ip - Address of the monitored application.
      port - Port of the TCP controller.
      hostname - The name of the component which is using this IP and port.
      operationSignature - The operation signature of the method that should be monitored.
      parameters - The map of parameters to be set, the key is the name and the values are the values for the parameter.
      Throws:
      RemoteControlFailedException - if the connection can not be established within a set timeout.
    • deactivateOperationMonitoring

      public void deactivateOperationMonitoring​(java.lang.String ip, int port, java.lang.String serviceComponent, java.lang.String operationSignature) throws RemoteControlFailedException
      Deactivates monitoring of a method on one monitored application via TCP.
      Parameters:
      ip - Address of the monitored application.
      port - Port of the TCP controller.
      serviceComponent - The name of the component which is using this IP and port.
      operationSignature - The operation signature of the method that should no longer be monitored.
      Throws:
      RemoteControlFailedException - if the connection can not be established within a set timeout.
    • isKnownHost

      public boolean isKnownHost​(java.lang.String ip, int port)
      Checks if a host is known. The searched pattern is ip:port.
      Parameters:
      ip - the IP of the host.
      port - the used port of the TCP connections
      Returns:
      true, if the connections to the host was already established.