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

com.rollbar.reactivestreams.notifier.sender.http.AsyncHttpClient Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.rollbar.reactivestreams.notifier.sender.http;

import org.reactivestreams.Publisher;

/**
 * General interface for non-blocking reactivestreams HTTP client implementations.
 */
public interface AsyncHttpClient extends AutoCloseable {
  /**
   * Execute a HTTP request.
   *
   * 

* The returned publisher *MUST* signal {@link org.reactivestreams.Subscriber#onNext} for * any valid responses, including ones with error status codes (>= 400). It should only * signal {@link org.reactivestreams.Subscriber#onError(Throwable)} when the request / response * exchange could not be completed. *

* * @param httpRequest The request. * @return A mono publisher that will execute the HTTP request once the first element is * requested. */ Publisher send(AsyncHttpRequest httpRequest); /** * Closes this client. * *

* Note: the {@link AutoCloseable#close()} implementation should call this method with a false * wait argument, or include equivalent logic. *

* * @param wait If true, the close method will block until pending HTTP operations complete. */ void close(boolean wait); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy