Interface AsyncHandler


public interface AsyncHandler
Determines when an asynchronous action started by an invocation of an asynchronous method completes. For the purpose of method invokers, a method is called asynchronous if it matches exactly one async handler. An async handler is either a return type async handler or a parameter type async handler. For an asynchronous method, the matching async handler is called during Invoker.invoke().

Async handlers must be stateless. No guarantees about their lifecycle are made.

The CDI container provides built-in return type async handlers for CompletionStage, CompletableFuture and Flow.Publisher.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A parameter type async handler is a service provider for this interface declared in META-INF/services.
    static interface 
    A return type async handler is a service provider for this interface declared in META-INF/services.