All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.dongliu.cute.http.AsyncResponseHandler Maven / Gradle / Ivy

The newest version!
package net.dongliu.cute.http;

import java.nio.ByteBuffer;
import java.util.List;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.Flow.Publisher;

/**
 * Consumer the response body, and when consumer finished, return the transformed value. The implementations should not block caller thread.
 * @param  the converted body type
 */
@FunctionalInterface
public interface AsyncResponseHandler {

    /**
     * A async method, that handle and transform response body.
     */
    CompletionStage handle(ResponseInfo info, Publisher> body);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy