Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcaec155

Browse files
atehranislandelle
authored andcommitted
Implement a getter for the AsyncHttpClientConfig on AsyncHttpClient,closeAsyncHttpClient#1420 (AsyncHttpClient#1422)
1 parent8c6a633 commitcaec155

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

‎client/src/main/java/org/asynchttpclient/AsyncHttpClient.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,10 @@ public interface AsyncHttpClient extends Closeable {
281281
* @param predicate the predicate
282282
*/
283283
voidflushChannelPoolPartitions(Predicate<Object>predicate);
284+
285+
/**
286+
* Return the config associated to this client.
287+
* @return the config associated to this client.
288+
*/
289+
AsyncHttpClientConfiggetConfig();
284290
}

‎client/src/main/java/org/asynchttpclient/DefaultAsyncHttpClient.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,9 @@ protected BoundRequestBuilder requestBuilder(String method, String url) {
276276
protectedBoundRequestBuilderrequestBuilder(Requestprototype) {
277277
returnnewBoundRequestBuilder(this,prototype).setSignatureCalculator(signatureCalculator);
278278
}
279+
280+
@Override
281+
publicAsyncHttpClientConfiggetConfig() {
282+
returnthis.config;
283+
}
279284
}

‎extras/registry/src/test/java/org/asynchttpclient/extras/registry/BadAsyncHttpClient.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,9 @@ public ClientStats getClientStats() {
138138
publicvoidflushChannelPoolPartitions(Predicate<Object>predicate) {
139139
thrownewUnsupportedOperationException();
140140
}
141+
142+
@Override
143+
publicAsyncHttpClientConfiggetConfig() {
144+
returnnull;
145+
}
141146
}

‎extras/registry/src/test/java/org/asynchttpclient/extras/registry/TestAsyncHttpClient.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,9 @@ public ClientStats getClientStats() {
134134
publicvoidflushChannelPoolPartitions(Predicate<Object>predicate) {
135135
thrownewUnsupportedOperationException();
136136
}
137+
138+
@Override
139+
publicAsyncHttpClientConfiggetConfig() {
140+
returnnull;
141+
}
137142
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp