Class DummyProbeController
java.lang.Object
kieker.analysis.architecture.adaptation.DummyProbeController
- All Implemented Interfaces:
IProbeController
Controller to send remote control events for probes to given addresses. Establishes TCP
connections and keeps them open.
- Author:
- Marc Adolf
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateMonitoredPattern(String ip, int port, String hostname, String pattern) Activates monitoring of a method (pattern) on one monitored application via TCP.voidactivateParameterMonitoredPattern(String ip, int port, String hostname, String operationSignature, Map<String, List<String>> parameters) Activates monitoring of a method (pattern) on one monitored application via TCP and transfers parameter.voidcontrolProbe(BasicTcpControlEvent event) Convenience method forcontrol events.voiddeactivateMonitoredPattern(String ip, int port, String hostname, String pattern) Deactivates monitoring of a method (pattern) on one monitored application via TCP.booleanisKnownHost(String ip, int port) Checks if a host is known.voidupdateProbeParameter(String ip, int port, String hostname, String pattern, Map<String, List<String>> parameters) Updates the given parameters for a probe.
-
Constructor Details
-
DummyProbeController
public DummyProbeController()Create the probe controller.
-
-
Method Details
-
controlProbe
Convenience method forcontrol events.- Specified by:
controlProbein interfaceIProbeController- 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(String ip, int port, String hostname, String pattern, Map<String, List<String>> parameters) throws RemoteControlFailedExceptionUpdates 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.
-
activateMonitoredPattern
public void activateMonitoredPattern(String ip, int port, String hostname, String pattern) throws RemoteControlFailedException Activates monitoring of a method (pattern) 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.pattern- The pattern of the method that should be monitored.- Throws:
RemoteControlFailedException- if the connection can not be established within a set timeout.
-
activateParameterMonitoredPattern
public void activateParameterMonitoredPattern(String ip, int port, String hostname, String operationSignature, Map<String, List<String>> parameters) throws RemoteControlFailedExceptionActivates monitoring of a method (pattern) 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 pattern of the method that should be 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.
-
deactivateMonitoredPattern
public void deactivateMonitoredPattern(String ip, int port, String hostname, String pattern) throws RemoteControlFailedException Deactivates monitoring of a method (pattern) 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.pattern- The pattern of the method that should no longer be monitored.- Throws:
RemoteControlFailedException- if the connection can not be established within a set timeout.
-
isKnownHost
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.
-