Package me.legrange.services.monitor
Class MonitoredComponent<S extends Service,C>
- java.lang.Object
-
- me.legrange.service.Component<S,C>
-
- me.legrange.services.monitor.MonitoredComponent<S,C>
-
- Type Parameters:
C-S-
- All Implemented Interfaces:
WithComponent,WithJetty,WithMonitor
public abstract class MonitoredComponent<S extends Service,C> extends Component<S,C> implements WithMonitor, WithJetty
- Author:
- gideon
-
-
Constructor Summary
Constructors Constructor Description MonitoredComponent(S service)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmonitor(String name, Supplier<State> function)-
Methods inherited from class me.legrange.service.Component
getComponent, getName, requireComponent, requiresConfig, service, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface me.legrange.service.WithComponent
getComponent
-
-
-
-
Constructor Detail
-
MonitoredComponent
public MonitoredComponent(S service)
-
-
Method Detail
-
monitor
public final void monitor(String name, Supplier<State> function) throws ComponentException
- Specified by:
monitorin interfaceWithMonitor- Throws:
ComponentException
-
-