ApplicationContextFactory class abstract
A factory for creating JetLeaf application context and environment instances.
This abstraction allows you to define how a ConfigurableApplicationContext
and its ConfigurableEnvironment are created based on the application's
runtime type — such as NONE, WEB.
Default Usage
JetLeaf provides a default implementation via ApplicationContextFactory.DEFAULT
which uses DefaultApplicationContextFactory.
Example:
final factory = ApplicationContextFactory.DEFAULT;
final context = factory.create(ApplicationType.WEB);
This interface enables integration points for customizing the environment or context bootstrapping behavior, especially in advanced runtime scenarios.
- Implementers
Constructors
- ApplicationContextFactory()
-
A factory for creating JetLeaf application context and environment instances.
const
-
ApplicationContextFactory.of(Supplier<
ConfigurableApplicationContext> supplier) -
Creates an ApplicationContextFactory that uses the provided
supplierto construct the application context.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
create(
ApplicationType applicationType) → ConfigurableApplicationContext -
Creates a new ConfigurableApplicationContext for the given
applicationType. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited