closeKey

abstract fun closeKey(key: ChannelEventKey<*>, validations: Set<ValidationBeforeClosing> = ValidationBeforeClosing.ALL)

Close the bus identified by key.

You can validate the bus before closing by passing validations. By default, all validations are enabled. If you want to close the bus without any validation, just pass an empty set or ValidationBeforeClosing.NONE.

Parameters

key

the key to identify the bus.

validations

the validations to check before closing the bus.

See also

Throws

if failed to close the bus.