[#1425] Allow to access the EventLoopGroups via the Bootstraps

This commit is contained in:
Norman Maurer 2013-06-10 07:54:53 +02:00
parent d9af92f354
commit fa6999cd42
2 changed files with 12 additions and 1 deletions

View File

@ -364,7 +364,10 @@ abstract class AbstractBootstrap<B extends AbstractBootstrap<B, C>, C extends Ch
return handler; return handler;
} }
final EventLoopGroup group() { /**
* Return the configured {@link EventLoopGroup} or {@code null} if non is configured yet.
*/
public final EventLoopGroup group() {
return group; return group;
} }

View File

@ -136,6 +136,14 @@ public final class ServerBootstrap extends AbstractBootstrap<ServerBootstrap, Se
return this; return this;
} }
/**
* Return the configured {@link EventLoopGroup} which will be used for the child channels or {@code null}
* if non is configured yet.
*/
public EventLoopGroup childGroup() {
return childGroup;
}
@Override @Override
void init(Channel channel) throws Exception { void init(Channel channel) throws Exception {
final Map<ChannelOption<?>, Object> options = options(); final Map<ChannelOption<?>, Object> options = options();