2323/**
2424 * Thin wrapper around Apache {@link HttpAsyncClient} to expose
2525 * <a href="https://www.reactive-streams.org/">Reactive Streams</a> interfaces.<br>
26- * The methods in this interface aim to mirror the ones in {@link HttpAsyncClient} and {@link
27- * CloseableHttpAsyncClient}.
26+ * The methods in this interface aim to mirror the ones in {@link HttpAsyncClient} and
27+ * {@link CloseableHttpAsyncClient}.
2828 *
2929 * @author sli
3030 * @see HttpReactiveClients
3131 */
3232public interface HttpReactiveClient {
3333
3434 /**
35- * Execute the given request. This method is equivalent to {@link HttpAsyncClient#execute(AsyncRequestProducer,
36- * AsyncResponseConsumer, HandlerFactory, HttpContext, FutureCallback)}. If the {@link Future}
37- * produced by the equivalent {@link HttpAsyncClient} method completes with {@code null}, then the
38- * returning {@link Publisher} of this method will complete with no element.
35+ * Execute the given request. This method is equivalent to
36+ * {@link HttpAsyncClient#execute(AsyncRequestProducer, AsyncResponseConsumer, HandlerFactory,
37+ * HttpContext, FutureCallback)}. If the {@link Future} produced by the equivalent
38+ * {@link HttpAsyncClient} method completes with {@code null}, then the returning
39+ * {@link Publisher} of this method will complete with no element.
3940 */
4041 <T > Publisher <T > execute (@ Nonnull AsyncRequestProducer requestProducer ,
4142 @ Nonnull AsyncResponseConsumer <T > responseConsumer ,
4243 @ Nullable HandlerFactory <AsyncPushConsumer > pushHandlerFactory ,
4344 @ Nullable HttpContext context );
4445
4546 /**
46- * Convenience method for {@link #execute(AsyncRequestProducer, AsyncResponseConsumer,
47- * HandlerFactory, HttpContext)}, equivalent to {@link CloseableHttpAsyncClient#execute(AsyncRequestProducer,
48- * AsyncResponseConsumer, HttpContext, FutureCallback)}
47+ * Convenience method for
48+ * {@link #execute(AsyncRequestProducer, AsyncResponseConsumer, HandlerFactory, HttpContext)},
49+ * equivalent to
50+ * {@link CloseableHttpAsyncClient#execute(AsyncRequestProducer, AsyncResponseConsumer,
51+ * HttpContext, FutureCallback)}
4952 */
5053 default <T > Publisher <T > execute (@ Nonnull AsyncRequestProducer requestProducer ,
5154 @ Nonnull AsyncResponseConsumer <T > responseConsumer , @ Nullable HttpContext context ) {
5255 return execute (requestProducer , responseConsumer , null , context );
5356 }
5457
5558 /**
56- * Convenience method for {@link #execute(AsyncRequestProducer, AsyncResponseConsumer,
57- * HandlerFactory, HttpContext)}, equivalent to {@link CloseableHttpAsyncClient#execute(AsyncRequestProducer,
58- * AsyncResponseConsumer, FutureCallback)}.
59+ * Convenience method for
60+ * {@link #execute(AsyncRequestProducer, AsyncResponseConsumer, HandlerFactory, HttpContext)},
61+ * equivalent to
62+ * {@link CloseableHttpAsyncClient#execute(AsyncRequestProducer, AsyncResponseConsumer,
63+ * FutureCallback)}.
5964 */
6065 default <T > Publisher <T > execute (@ Nonnull AsyncRequestProducer requestProducer ,
6166 @ Nonnull AsyncResponseConsumer <T > responseConsumer ) {
@@ -64,62 +69,63 @@ default <T> Publisher<T> execute(@Nonnull AsyncRequestProducer requestProducer,
6469
6570 /**
6671 * Execute a simple in-memory request and get a simple in-memory response. This method is
67- * equivalent to {@link CloseableHttpAsyncClient#execute(SimpleHttpRequest, HttpContext,
68- * FutureCallback)}. The returning {@link Publisher} completes with exactly 1 element.
72+ * equivalent to
73+ * {@link CloseableHttpAsyncClient#execute(SimpleHttpRequest, HttpContext, FutureCallback)}. The
74+ * returning {@link Publisher} completes with exactly 1 element.
6975 */
7076 default Publisher <SimpleHttpResponse > execute (@ Nonnull SimpleHttpRequest request ,
7177 @ Nullable HttpContext context ) {
7278 return execute (SimpleRequestProducer .create (request ), SimpleResponseConsumer .create (), context );
7379 }
7480
7581 /**
76- * Convenience method for {@link #execute(SimpleHttpRequest, HttpContext)}, equivalent to {@link
77- * CloseableHttpAsyncClient#execute(SimpleHttpRequest, FutureCallback)}.
82+ * Convenience method for {@link #execute(SimpleHttpRequest, HttpContext)}, equivalent to
83+ * {@link CloseableHttpAsyncClient#execute(SimpleHttpRequest, FutureCallback)}.
7884 */
7985 default Publisher <SimpleHttpResponse > execute (@ Nonnull SimpleHttpRequest request ) {
8086 return execute (request , null );
8187 }
8288
8389 /**
84- * Execute the given request and get a streaming response body as a {@link Publisher} of {@link
85- * ByteBuffer}s. The returning {@link Publisher} completes with exactly 1 element. The {@link
86- * Publisher} within the returning {@link Publisher} may contain 0 to n elements.
90+ * Execute the given request and get a streaming response body as a {@link Publisher} of
91+ * {@link ByteBuffer}s. The returning {@link Publisher} completes with exactly 1 element. The
92+ * {@link Publisher} within the returning {@link Publisher} may contain 0 to n elements.
8793 */
8894 Publisher <Message <HttpResponse , Publisher <ByteBuffer >>> streamingExecute (
8995 @ Nonnull AsyncRequestProducer requestProducer ,
9096 @ Nullable HandlerFactory <AsyncPushConsumer > pushHandlerFactory ,
9197 @ Nullable HttpContext context );
9298
9399 /**
94- * Convenience method for {@link #streamingExecute(AsyncRequestProducer, HandlerFactory,
95- * HttpContext)}
100+ * Convenience method for
101+ * {@link #streamingExecute(AsyncRequestProducer, HandlerFactory, HttpContext)}
96102 */
97103 default Publisher <Message <HttpResponse , Publisher <ByteBuffer >>> streamingExecute (
98104 @ Nonnull AsyncRequestProducer requestProducer , @ Nullable HttpContext context ) {
99105 return streamingExecute (requestProducer , null , context );
100106 }
101107
102108 /**
103- * Convenience method for {@link #streamingExecute(AsyncRequestProducer, HandlerFactory,
104- * HttpContext)}
109+ * Convenience method for
110+ * {@link #streamingExecute(AsyncRequestProducer, HandlerFactory, HttpContext)}
105111 */
106112 default Publisher <Message <HttpResponse , Publisher <ByteBuffer >>> streamingExecute (
107113 @ Nonnull AsyncRequestProducer requestProducer ) {
108114 return streamingExecute (requestProducer , null );
109115 }
110116
111117 /**
112- * Execute a simple in-memory request and get a streaming response. Convenience method for {@link
113- * #streamingExecute(AsyncRequestProducer, HandlerFactory, HttpContext)}
118+ * Execute a simple in-memory request and get a streaming response. Convenience method for
119+ * {@link #streamingExecute(AsyncRequestProducer, HandlerFactory, HttpContext)}
114120 */
115121 default Publisher <Message <HttpResponse , Publisher <ByteBuffer >>> streamingExecute (
116122 @ Nonnull SimpleHttpRequest request , @ Nullable HttpContext context ) {
117123 return streamingExecute (SimpleRequestProducer .create (request ), context );
118124 }
119125
120126 /**
121- * Convenience method for {@link #streamingExecute(AsyncRequestProducer, HandlerFactory,
122- * HttpContext)}
127+ * Convenience method for
128+ * {@link #streamingExecute(AsyncRequestProducer, HandlerFactory, HttpContext)}
123129 */
124130 default Publisher <Message <HttpResponse , Publisher <ByteBuffer >>> streamingExecute (
125131 @ Nonnull SimpleHttpRequest request ) {
0 commit comments