Interface AsyncServerRequestHandler<T>

  • Type Parameters:
    T - request representation.

    @Contract(threading=STATELESS)
    public interface AsyncServerRequestHandler<T>
    AsyncServerRequestHandler represents a routine for processing of a specific group of HTTP requests. Request execution filters are designed to take care of protocol specific aspects, whereas individual request handlers are expected to take care of application specific HTTP processing. The main purpose of a request handler is to generate a response object with a content entity to be sent back to the client in response to the given request.
    Since:
    5.0
    • Method Detail

      • prepare

        AsyncRequestConsumer<T> prepare​(HttpRequest request,
                                        EntityDetails entityDetails,
                                        HttpContext context)
                                 throws HttpException
        Triggered to signal new incoming request. The handler can create a AsyncRequestConsumer based on properties of the request head and entity details and let it process the request data stream. The request handler will be used to generate an object that represents request data.
        Parameters:
        request - the incoming request head.
        entityDetails - the request entity details or null if the request does not enclose an entity.
        context - the actual execution context.
        Returns:
        the request handler.
        Throws:
        HttpException