public interface IRuntimeLifecycleBinder
Modifier and Type | Interface and Description |
---|---|
static class |
IRuntimeLifecycleBinder.LifecycleEvent
Lifecycle events
|
Modifier and Type | Method and Description |
---|---|
void |
addBinding(IRuntimeLifecycleBinder.LifecycleEvent event,
LifecycleBinding binding)
Register a hook to run upon runtime lifecycle phase
|
void |
onShutdown(LifecycleBinding binding)
Register a hook to run upon runtime shutdown
|
void |
onShutdown(Runnable r)
Register an async hook to run upon runtime shutdown
|
void |
onShutdown(String description,
Runnable r)
Register an async hook to run upon runtime shutdown
|
void |
onStartup(LifecycleBinding binding)
Register a hook to run upon runtime startup
|
void |
onStartup(Runnable r)
Register a hook to run upon runtime startup
|
void |
onStartup(String description,
Runnable r)
Register a hook to run upon runtime startup
|
void |
visitBindings(IRuntimeLifecycleBinder.LifecycleEvent event,
Consumer<LifecycleBinding> consumer)
Visitor interface for inspecting all registered hooks for a particular lifecycle event.
|
void onStartup(Runnable r)
void onStartup(String description, Runnable r)
description
- Human-readable description of the hookvoid onStartup(LifecycleBinding binding)
binding
- Hookvoid onShutdown(Runnable r)
void onShutdown(String description, Runnable r)
description
- Human-readable description of the hookvoid onShutdown(LifecycleBinding binding)
binding
- Hookvoid addBinding(IRuntimeLifecycleBinder.LifecycleEvent event, LifecycleBinding binding)
event
- Lifecycle phase of the runtimebinding
- Hookvoid visitBindings(IRuntimeLifecycleBinder.LifecycleEvent event, Consumer<LifecycleBinding> consumer)
event
- Lifecycle eventconsumer
- Bindings consumer.Copyright © 2016–2021. All rights reserved.