|
18 | 18 | import io.netty.channel.Channel;
|
19 | 19 | import io.netty.channel.ChannelFactory;
|
20 | 20 | import io.netty.channel.EventLoopGroup;
|
21 |
| -import io.netty.channel.IoHandlerFactory; |
22 | 21 | import io.netty.channel.MultiThreadIoEventLoopGroup;
|
| 22 | +import io.netty.channel.nio.NioEventLoopGroup; |
23 | 23 | import io.netty.channel.nio.NioIoHandler;
|
24 | 24 | import io.netty.channel.socket.DatagramChannel;
|
25 | 25 | import io.netty.channel.socket.nio.NioDatagramChannel;
|
@@ -154,13 +154,17 @@ public static SdkEventLoopGroup create(EventLoopGroup eventLoopGroup, ChannelFac
|
154 | 154 | * <p>
|
155 | 155 | * {@link ChannelFactory} will be resolved based on the type of {@link EventLoopGroup} provided. IllegalArgumentException will
|
156 | 156 | * be thrown for any unknown EventLoopGroup type.
|
| 157 | + * |
157 | 158 | * <p>
|
158 |
| - * If {@link MultiThreadIoEventLoopGroup} is passed in, {@link NioSocketChannel} and {@link NioDatagramChannel} will be |
159 |
| - * resolved, regardless of the transport {@link IoHandlerFactory} set on the {@link MultiThreadIoEventLoopGroup}. This is |
160 |
| - * because it is not possible to determine the type of transport factory from a given {@link MultiThreadIoEventLoopGroup}. |
| 159 | + * <b>Special handling for {@link MultiThreadIoEventLoopGroup}:</b> |
| 160 | + * When a {@link MultiThreadIoEventLoopGroup} is provided (not the deprecated transport-specific event loop groups like |
| 161 | + * {@link NioEventLoopGroup}) the SDK cannot determine which transport type was configured and will default to using |
| 162 | + * {@link NioSocketChannel} and {@link NioDatagramChannel}. |
| 163 | + * |
161 | 164 | * <p>
|
162 |
| - * To use a {@link MultiThreadIoEventLoopGroup} with a non-Nio transport factory, use |
163 |
| - * {@link #create(EventLoopGroup, ChannelFactory, ChannelFactory)}, specifying the socket and datagram channels. |
| 165 | + * To use {@link MultiThreadIoEventLoopGroup} with non-NIO transports (such as Epoll or KQueue), |
| 166 | + * use {@link #create(EventLoopGroup, ChannelFactory, ChannelFactory)} and explicitly specify |
| 167 | + * the desired socket and datagram channel factories. |
164 | 168 | *
|
165 | 169 | * @param eventLoopGroup the EventLoopGroup to be used
|
166 | 170 | * @return a new instance of SdkEventLoopGroup
|
|
0 commit comments