RuntimeComponent

Complete lifecycle contract owned by WowRuntime.

Construction must be inert: acquire resources only from prepare or start. forceStop must nevertheless be safe before preparation so a failed container refresh can release any accidentally pre-existing resources.

forceStop may be invoked again when force-stop overlaps a lifecycle action. For prepare and stopGracefully, compensation follows publisher termination or the return of upstream cancellation. For start and quiesce, it follows method return. If force-stop wins before a publisher is subscribed, the runtime does not subscribe it.

This contract deliberately does not extend AutoCloseable. Container integrations must delegate lifecycle exclusively to WowRuntime instead of inferring an independent close() owner for every component.

Inheritors

Functions

Link copied to clipboard
abstract fun forceStop()

Releases resources promptly without blocking, and remains safe before prepare and across repeated or overlapping calls.

Link copied to clipboard
abstract fun prepare(runtimeContext: RuntimeContext): Mono<Void>

Prepares this component without opening message processing.

Link copied to clipboard
open fun quiesce()

Stops admitting new work after the runtime has atomically closed global admission.

Link copied to clipboard
abstract fun start()
Link copied to clipboard
abstract fun stopGracefully(): Mono<Void>