Skip to content

Commit 39d5f5a

Browse files
committed
Expose EventLoopGroup on DefaultAsyncHttpClient, close AsyncHttpClient#1221
1 parent b41732e commit 39d5f5a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.asynchttpclient;
1818

1919
import static org.asynchttpclient.util.Assertions.assertNotNull;
20+
import io.netty.channel.EventLoopGroup;
2021
import io.netty.util.HashedWheelTimer;
2122
import io.netty.util.Timer;
2223

@@ -247,6 +248,10 @@ public ChannelPool getChannelPool() {
247248
return channelManager.getChannelPool();
248249
}
249250

251+
public EventLoopGroup getEventLoopGroup() {
252+
return channelManager.getEventLoopGroup();
253+
}
254+
250255
protected BoundRequestBuilder requestBuilder(String method, String url) {
251256
return new BoundRequestBuilder(this, method, config.isDisableUrlEncodingForBoundRequests()).setUrl(url).setSignatureCalculator(signatureCalculator);
252257
}

client/src/main/java/org/asynchttpclient/netty/channel/ChannelManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,4 +487,8 @@ public void drainChannelAndOffer(final Channel channel, final NettyResponseFutur
487487
public ChannelPool getChannelPool() {
488488
return channelPool;
489489
}
490+
491+
public EventLoopGroup getEventLoopGroup() {
492+
return eventLoopGroup;
493+
}
490494
}

0 commit comments

Comments
 (0)