Class MonitorFactory
java.lang.Object
org.sentrysoftware.metricshub.engine.telemetry.MonitorFactory
Factory class for creating and updating
Monitor instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildMonitorId(@NonNull String connectorId, @NonNull String monitorType, @NonNull String id) Build the monitor unique identifier [connectorid]_[monitorType]_[id]createEndpointHostMonitor(boolean isLocalhost) Creates the endpoint Host monitorThis method creates or updates the monitorThis method creates or updates the monitor
-
Constructor Details
-
MonitorFactory
public MonitorFactory()
-
-
Method Details
-
createOrUpdateMonitor
This method creates or updates the monitor- Parameters:
id- identifier of the monitor- Returns:
- created or updated
Monitorinstance
-
createOrUpdateMonitor
This method creates or updates the monitor- Returns:
- created or updated
Monitorinstance
-
createEndpointHostMonitor
Creates the endpoint Host monitor- Parameters:
isLocalhost- Whether the host should be localhost or not.- Returns:
- Monitor instance
-
buildMonitorId
public static String buildMonitorId(@NonNull @NonNull String connectorId, @NonNull @NonNull String monitorType, @NonNull @NonNull String id) Build the monitor unique identifier [connectorid]_[monitorType]_[id]- Parameters:
connectorId- The connector compiled file name (identifier)monitorType- The type of the monitor.id- The id of the monitor we wish to build its identifier- Returns:
Stringvalue containing the key of the monitor
-