public interface MonitoringConsoleFactory
ServiceLoader mechanism, getInstance() can be used for convenience.
This allows a monitored application to be in control of creating the MonitoringConsole using the resolved
factory instance. This is usually needed so that the monitored application can bootstrap the
MonitoringConsole at the right point in its bootstrapping process.| Modifier and Type | Method and Description |
|---|---|
MonitoringConsole |
create(String instance,
boolean receiver,
MonitoringConsoleRuntime runtime,
Supplier<? extends List<MonitoringDataSource>> dataSources,
Supplier<? extends List<MonitoringWatchSource>> watchSources)
Creates a new instance of a
MonitoringConsole processing unit. |
MonitoringConsole |
getCreatedConsole() |
static MonitoringConsoleFactory |
getInstance() |
MonitoringConsole create(String instance, boolean receiver, MonitoringConsoleRuntime runtime, Supplier<? extends List<MonitoringDataSource>> dataSources, Supplier<? extends List<MonitoringWatchSource>> watchSources)
MonitoringConsole processing unit.instance - the name of the instance the console represent, the instance it collects data fromreceiver - true, if the created instance is the single receiver of the cluster (the central instance), false
if it is one of the senders of the cluster.runtime - the runtime to use by the created instance, cannot be nullMonitoringConsoleMonitoringConsole getCreatedConsole() throws IllegalStateException
MonitoringConsole instance previously created using
create(String, boolean, MonitoringConsoleRuntime, Supplier, Supplier)IllegalStateException - if this method is called before
create(String, boolean, MonitoringConsoleRuntime, Supplier, Supplier) wasstatic MonitoringConsoleFactory getInstance()
MonitoringConsoleFactory instance or null if none is available on classpath.Copyright © 2020. All rights reserved.