| Constructor and Description |
|---|
MonitorImpl(@NonNull PluginService pluginService,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties properties,
long monitorDisposalTimeMillis,
@NonNull MonitorService monitorService)
Store the monitoring configuration for a connection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearContexts()
Clear all
MonitorConnectionContext associated with this Monitor instance. |
boolean |
isStopped()
Whether this
Monitor has stopped monitoring a particular server. |
void |
run() |
void |
startMonitoring(MonitorConnectionContext context) |
void |
stopMonitoring(MonitorConnectionContext context) |
public MonitorImpl(@NonNull PluginService pluginService, @NonNull HostSpec hostSpec, @NonNull java.util.Properties properties, long monitorDisposalTimeMillis, @NonNull MonitorService monitorService)
pluginService - A service for creating new connections.hostSpec - The HostSpec of the server this MonitorImpl
instance is monitoring.properties - The Properties containing additional monitoring
configuration.monitorDisposalTimeMillis - Time in milliseconds before stopping the monitoring thread
where there are no active connection to the server this
MonitorImpl instance is monitoring.monitorService - A reference to the MonitorServiceImpl implementation
that initialized this class.public void startMonitoring(MonitorConnectionContext context)
startMonitoring in interface Monitorpublic void stopMonitoring(MonitorConnectionContext context)
stopMonitoring in interface Monitorpublic void clearContexts()
MonitorMonitorConnectionContext associated with this Monitor instance.clearContexts in interface Monitorpublic void run()
run in interface java.lang.Runnable