File tree Expand file tree Collapse file tree 5 files changed +31
-39
lines changed
http-client-gson-adapter/src/main/java/io/avaje/http/client/gson
http-client/src/main/java/io/avaje/http/client Expand file tree Collapse file tree 5 files changed +31
-39
lines changed Original file line number Diff line number Diff line change 2121 *
2222 * <pre>{@code
2323 *
24- * HttpClientContext .builder()
24+ * HttpClient .builder()
2525 * .baseUrl(baseUrl)
2626 * .requestListener(new RequestLogger())
2727 * //.bodyAdapter(new JacksonBodyAdapter(new ObjectMapper()))
Original file line number Diff line number Diff line change @@ -224,14 +224,6 @@ public interface HttpAsyncResponse {
224224 */
225225 <E > CompletableFuture <HttpResponse <E >> handler (HttpResponse .BodyHandler <E > bodyHandler );
226226
227- /**
228- * Deprecated - migrate to handler().
229- */
230- @ Deprecated
231- default <E > CompletableFuture <HttpResponse <E >> withHandler (HttpResponse .BodyHandler <E > bodyHandler ) {
232- return handler (bodyHandler );
233- }
234-
235227 /**
236228 * Process converting the response body to the given type.
237229 * <p>
Original file line number Diff line number Diff line change @@ -118,14 +118,6 @@ public interface HttpCallResponse {
118118 */
119119 <E > HttpCall <HttpResponse <E >> handler (HttpResponse .BodyHandler <E > bodyHandler );
120120
121- /**
122- * Deprecated - migrate to handler().
123- */
124- @ Deprecated
125- default <E > HttpCall <HttpResponse <E >> withHandler (HttpResponse .BodyHandler <E > bodyHandler ) {
126- return handler (bodyHandler );
127- }
128-
129121 /**
130122 * A bean response to execute async or sync.
131123 * <p>
Original file line number Diff line number Diff line change @@ -72,19 +72,6 @@ static Builder builder() {
7272 */
7373 UrlBuilder url ();
7474
75- /**
76- * Deprecated - migrate to {@link #bodyAdapter()}.
77- * <p>
78- * Return the body adapter used by the client context.
79- * <p>
80- * This is the body adapter used to convert request and response
81- * bodies to java types. For example using Jackson with JSON payloads.
82- */
83- @ Deprecated
84- default BodyAdapter converters () {
85- return bodyAdapter ();
86- }
87-
8875 /**
8976 * Return the BodyAdapter that this client is using.
9077 */
@@ -355,8 +342,37 @@ interface State {
355342 /**
356343 * Statistic metrics collected to provide an overview of activity of this client.
357344 */
358- interface Metrics extends HttpClientContext .Metrics {
345+ interface Metrics {
346+
347+ /**
348+ * Return the total number of responses.
349+ */
350+ long totalCount ();
351+
352+ /**
353+ * Return the total number of error responses (status code >= 300).
354+ */
355+ long errorCount ();
359356
357+ /**
358+ * Return the total response bytes (excludes streaming responses).
359+ */
360+ long responseBytes ();
361+
362+ /**
363+ * Return the total response time in microseconds.
364+ */
365+ long totalMicros ();
366+
367+ /**
368+ * Return the max response time in microseconds (since the last reset).
369+ */
370+ long maxMicros ();
371+
372+ /**
373+ * Return the average response time in microseconds.
374+ */
375+ long avgMicros ();
360376 }
361377
362378 /** Components register Generated Client interface Providers */
Original file line number Diff line number Diff line change @@ -307,12 +307,4 @@ public interface HttpClientResponse {
307307 */
308308 <T > HttpResponse <T > handler (HttpResponse .BodyHandler <T > responseHandler );
309309
310- /**
311- * Deprecated - migrate to handler().
312- */
313- @ Deprecated
314- default <T > HttpResponse <T > withHandler (HttpResponse .BodyHandler <T > responseHandler ) {
315- return handler (responseHandler );
316- }
317-
318310}
You can’t perform that action at this time.
0 commit comments