Package jakarta.enterprise.inject.spi
Interface AfterDeploymentValidation
public interface AfterDeploymentValidation
The event type of the third event fired by the container after it has validated that there are no deployment problems and
before creating contexts or processing requests. If any observer method of the AfterDeploymentValidation event throws
an exception, the exception is treated as a deployment problem by the container.
No requests will be processed by the deployment until all observers of this event return.
CDI Lite implementations are not required to provide support for Portable Extensions.
- Author:
- David Allen
-
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters a deployment problem with the container, causing the container to abort deployment after all observers have been notified.default voidensureAsyncHandlerExists(Class<?> asyncType) Ensures that an async handler exists for the given async type.voidensureAsyncHandlerExists(Class<?> asyncType, Supplier<String> message) Ensures that an async handler exists for the given async type.
-
Method Details
-
addDeploymentProblem
Registers a deployment problem with the container, causing the container to abort deployment after all observers have been notified.- Parameters:
t- The deployment problem as aThrowable- Throws:
IllegalStateException- if called outside of the observer method invocation
-
ensureAsyncHandlerExists
Ensures that an async handler exists for the given async type. If it does not exist, registers a deployment problem as ifaddDeploymentProblem(Throwable)was called.- Parameters:
asyncType- the required async type, must not benull- Throws:
IllegalStateException- if called outside of the observer method invocation
-
ensureAsyncHandlerExists
Ensures that an async handler exists for the given async type. If it does not exist, registers a deployment problem as ifaddDeploymentProblem(Throwable)was called. The deployment problem includes the givenmessagein a suitable, implementation-defined manner.- Parameters:
asyncType- the required async type, must not benullmessage- supplier of the error message, must not benullbut may returnnull- Throws:
IllegalStateException- if called outside of the observer method invocation
-