WebAwareProcessor class final
A pod initialization processor that automatically injects web-specific dependencies into pods implementing web-aware interfaces within a ServerWebApplicationContext.
This processor is responsible for preparing pods that need access to server infrastructure before they are fully initialized. It inspects each pod and injects the appropriate dependency if the pod implements one of the following web-aware interfaces:
- ServerContextAware: The pod will receive the current ServerContext.
- WebServerAware: The pod will receive the active WebServer instance.
- ContextPathAware: The pod will receive the configured context path string.
The processor runs before pod initialization and has the highest precedence, ensuring that web-related dependencies are available to pods as soon as they are created, enabling proper configuration and integration with the web server environment.
Typical usage scenarios include:
- Pods that need access to the server context for logging, configuration, or request dispatching.
- Pods that interact directly with the WebServer instance for lifecycle management or event registration.
- Pods that require knowledge of the application’s context path for URL generation or routing.
By centralizing this logic, WebAwareProcessor eliminates the need for individual pods to manually look up or request server resources, promoting consistency, reducing boilerplate, and supporting declarative web-aware pod design.
Constructors
- WebAwareProcessor(ServerWebApplicationContext applicationContext)
-
Creates a new WebAwareProcessor bound to the given
applicationContext.
Properties
- applicationContext → ServerWebApplicationContext
-
The web application context used to resolve and inject web-related dependencies.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getOrder(
) → int - A contract for objects that are assigned an order or precedence value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processAfterInitialization(
Object pod, Class podClass, String name) → Future< Object?> -
Processes the pod after all initialization callbacks have completed.
inherited
-
processBeforeInitialization(
Object pod, Class podClass, String name) → Future< Object?> - Processes the pod before any initialization callbacks are invoked.
-
shouldProcessBeforeInitialization(
Object pod, Class podClass, String name) → Future< bool> - Determines whether this processor should be applied to the given pod.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited