net.pincette.netty.http.RequestHandlerAccumulated Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pincette-netty-http Show documentation
Show all versions of pincette-netty-http Show documentation
A simple Netty HTTP server and client
package net.pincette.netty.http;
import io.netty.buffer.ByteBuf;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import java.io.InputStream;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.Flow.Publisher;
/**
* The interface for handling accumulated requests.
*
* @author Werner Donné
* @since 1.0
*/
@FunctionalInterface
public interface RequestHandlerAccumulated {
/**
* An implementation should return a publisher for the response body. It should not block.
*
* @param request the request received from the server.
* @param requestBody the accumulated request body.
* @param response the response the server will send back.
* @return The publisher through which the response body chunks are emitted. If the publisher is
* null
then nothing is emitted.
* @since 1.0
*/
CompletionStage> apply(
HttpRequest request, InputStream requestBody, HttpResponse response);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy