Interface LifecycleComponent
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
AbstractLifecycleComponent
,AutoCloseableLifecycleComponent
,AutoRecoveryService
,BookieService
,DataIntegrityService
,HttpService
,LifecycleComponentStack
,RxSchedulerLifecycleComponent
,ScrubberService
,ServerLifecycleComponent
,StatsProviderService
public interface LifecycleComponent extends java.lang.AutoCloseable
A component based on lifecycle management.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addLifecycleListener(LifecycleListener listener)
void
close()
java.lang.String
getName()
Lifecycle.State
lifecycleState()
default void
publishInfo(ComponentInfoPublisher componentInfoPublisher)
void
removeLifecycleListener(LifecycleListener listener)
void
setExceptionHandler(java.lang.Thread.UncaughtExceptionHandler handler)
Set the default handler invoked when a lifecycle component abruptly terminates due an uncaught exception.void
start()
void
stop()
-
-
-
Method Detail
-
getName
java.lang.String getName()
-
lifecycleState
Lifecycle.State lifecycleState()
-
addLifecycleListener
void addLifecycleListener(LifecycleListener listener)
-
removeLifecycleListener
void removeLifecycleListener(LifecycleListener listener)
-
publishInfo
default void publishInfo(ComponentInfoPublisher componentInfoPublisher)
-
start
void start()
-
stop
void stop()
-
close
void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
setExceptionHandler
void setExceptionHandler(java.lang.Thread.UncaughtExceptionHandler handler)
Set the default handler invoked when a lifecycle component abruptly terminates due an uncaught exception.- Parameters:
handler
- handler invoked when an uncaught exception happens in the lifecycle component.
-
-