Make Bootstrap and ServerBootstrap fully overridable

Related: #2034

Motivation:

Some users want to mock Bootstrap (or ServerBootstrap), and thus they
should not be final but be fully overridable and extensible.

Modifications:

Remove finals wherever possible

Result:

@daschl is happy.
This commit is contained in:
Trustin Lee 2014-10-17 16:16:13 +09:00
parent 0eb059bf58
commit 1e4bbe9839
3 changed files with 3 additions and 3 deletions

View File

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

View File

@ -44,7 +44,7 @@ import java.util.Map.Entry;
* <p>The {@link #bind()} methods are useful in combination with connectionless transports such as datagram (UDP).
* For regular TCP connections, please use the provided {@link #connect()} methods.</p>
*/
public final class Bootstrap extends AbstractBootstrap<Bootstrap, Channel> {
public class Bootstrap extends AbstractBootstrap<Bootstrap, Channel> {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(Bootstrap.class);

View File

@ -42,7 +42,7 @@ import java.util.concurrent.TimeUnit;
* {@link Bootstrap} sub-class which allows easy bootstrap of {@link ServerChannel}
*
*/
public final class ServerBootstrap extends AbstractBootstrap<ServerBootstrap, ServerChannel> {
public class ServerBootstrap extends AbstractBootstrap<ServerBootstrap, ServerChannel> {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(ServerBootstrap.class);