DefaultBootstrapContext

Default ConfigurableBootstrapContext implementation.

Author

Phillip Webb

Since

2.4.0

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Add an ApplicationListener that will be called with a BootstrapContextClosedEvent when the BootstrapContext is closed and the ApplicationContext has been prepared.
Link copied to clipboard
open fun close(applicationContext: ConfigurableApplicationContext)
Method to be called when BootstrapContext is closed and the ApplicationContext is prepared.
Link copied to clipboard
open fun <T> get(type: Class<T>): T
Return an instance from the context if the type has been registered.
Link copied to clipboard
open fun <T> getOrElse(type: Class<T>, other: T): T
Return an instance from the context if the type has been registered.
Link copied to clipboard
open fun <T> getOrElseSupply(type: Class<T>, other: Supplier<T>): T
Return an instance from the context if the type has been registered.
Link copied to clipboard
open fun <T, X : Throwable?> getOrElseThrow(type: Class<T>, exceptionSupplier: Supplier<out X>): T
Return an instance from the context if the type has been registered.
Link copied to clipboard
Return any existing InstanceSupplier for the given type.
Link copied to clipboard
open fun <T> isRegistered(type: Class<T>): Boolean
Return if a registration exists for the given type.
Link copied to clipboard
open fun <T> register(type: Class<T>, instanceSupplier: BootstrapRegistry.InstanceSupplier<T>)
Register a specific type with the registry.
Link copied to clipboard
open fun <T> registerIfAbsent(type: Class<T>, instanceSupplier: BootstrapRegistry.InstanceSupplier<T>)
Register a specific type with the registry if one is not already present.