public final class Monitors extends Object
| Modifier and Type | Method and Description |
|---|---|
static ProductionComponentMonitor |
createMonitorForComponent(javax.inject.Provider<?> componentProvider,
javax.inject.Provider<Set<ProductionComponentMonitor.Factory>> monitorFactorySetProvider)
Creates a new monitor for the given component, from a set of monitor factories.
|
static ProductionComponentMonitor.Factory |
delegatingProductionComponentMonitorFactory(Collection<? extends ProductionComponentMonitor.Factory> factories)
Returns a monitor factory that delegates to the given factories, and ensures that any method
called on this object, even transitively, does not throw a
RuntimeException or return
null. |
static javax.inject.Provider<ProductionComponentMonitor> |
noOpProductionComponentMonitorProvider()
Returns a provider of a no-op component monitor.
|
public static ProductionComponentMonitor.Factory delegatingProductionComponentMonitorFactory(Collection<? extends ProductionComponentMonitor.Factory> factories)
RuntimeException or return
null.
If the delegate monitors throw an Error, then that will escape this monitor
implementation. Errors are treated as unrecoverable conditions, and may cause the entire
component's execution to fail.
public static ProductionComponentMonitor createMonitorForComponent(javax.inject.Provider<?> componentProvider, javax.inject.Provider<Set<ProductionComponentMonitor.Factory>> monitorFactorySetProvider)
RuntimeException or return null.public static javax.inject.Provider<ProductionComponentMonitor> noOpProductionComponentMonitorProvider()
Copyright © 2016 Google, Inc.. All Rights Reserved.