diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerExpectContinueHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerExpectContinueHandler.java index db4f5a185f..7988188adf 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerExpectContinueHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpServerExpectContinueHandler.java @@ -17,8 +17,8 @@ package io.netty.handler.codec.http; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandler; import io.netty.util.ReferenceCountUtil; import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH; @@ -44,7 +44,7 @@ import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1; * * */ -public class HttpServerExpectContinueHandler implements ChannelInboundHandler { +public class HttpServerExpectContinueHandler implements ChannelHandler { private static final FullHttpResponse EXPECTATION_FAILED = new DefaultFullHttpResponse( HTTP_1_1, HttpResponseStatus.EXPECTATION_FAILED, Unpooled.EMPTY_BUFFER); diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/Utf8FrameValidator.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/Utf8FrameValidator.java index 20b1bc17c8..10744b32a4 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/Utf8FrameValidator.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/Utf8FrameValidator.java @@ -18,14 +18,14 @@ package io.netty.handler.codec.http.websocketx; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandler; import io.netty.handler.codec.CorruptedFrameException; /** * */ -public class Utf8FrameValidator implements ChannelInboundHandler { +public class Utf8FrameValidator implements ChannelHandler { private int fragmentedFramesCount; private Utf8Validator utf8Validator; diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandler.java index b3938e5225..bef4c5afb5 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandler.java @@ -16,7 +16,7 @@ package io.netty.handler.codec.http.websocketx; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandler; +import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelPipeline; import io.netty.handler.codec.http.HttpHeaders; @@ -36,7 +36,7 @@ import static io.netty.handler.codec.http.websocketx.WebSocketClientProtocolConf * This implementation will establish the websocket connection once the connection to the remote server was complete. * * To know once a handshake was done you can intercept the - * {@link ChannelInboundHandler#userEventTriggered(ChannelHandlerContext, Object)} and check if the event was of type + * {@link ChannelHandler#userEventTriggered(ChannelHandlerContext, Object)} and check if the event was of type * {@link ClientHandshakeStateEvent#HANDSHAKE_ISSUED} or {@link ClientHandshakeStateEvent#HANDSHAKE_COMPLETE}. */ public class WebSocketClientProtocolHandler extends WebSocketProtocolHandler { diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandshakeHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandshakeHandler.java index 70332cd9ee..e37beb58b6 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandshakeHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandshakeHandler.java @@ -17,8 +17,8 @@ package io.netty.handler.codec.http.websocketx; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandler; import io.netty.channel.ChannelPromise; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler.ClientHandshakeStateEvent; @@ -29,7 +29,7 @@ import java.util.concurrent.TimeUnit; import static io.netty.util.internal.ObjectUtil.*; -class WebSocketClientProtocolHandshakeHandler implements ChannelInboundHandler { +class WebSocketClientProtocolHandshakeHandler implements ChannelHandler { private static final long DEFAULT_HANDSHAKE_TIMEOUT_MS = 10000L; diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketCloseFrameHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketCloseFrameHandler.java index 37adc82228..a9f959bb50 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketCloseFrameHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketCloseFrameHandler.java @@ -17,8 +17,8 @@ package io.netty.handler.codec.http.websocketx; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelOutboundHandlerAdapter; import io.netty.channel.ChannelPromise; import io.netty.util.ReferenceCountUtil; import io.netty.util.concurrent.ScheduledFuture; @@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit; /** * Send {@link CloseWebSocketFrame} message on channel close, if close frame was not sent before. */ -final class WebSocketCloseFrameHandler extends ChannelOutboundHandlerAdapter { +final class WebSocketCloseFrameHandler implements ChannelHandler { private final WebSocketCloseStatus closeStatus; private final long forceCloseTimeoutMillis; private ChannelPromise closeSent; @@ -70,7 +70,7 @@ final class WebSocketCloseFrameHandler extends ChannelOutboundHandlerAdapter { promise = promise.unvoid(); closeSent = promise; } - super.write(ctx, msg, promise); + ctx.write(msg, promise); } private void applyCloseSentTimeout(ChannelHandlerContext ctx) { diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketFrameDecoder.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketFrameDecoder.java index 8c8142ec4e..061c50f6f8 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketFrameDecoder.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketFrameDecoder.java @@ -15,7 +15,7 @@ */ package io.netty.handler.codec.http.websocketx; -import io.netty.channel.ChannelInboundHandler; +import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelPipeline; /** @@ -23,5 +23,5 @@ import io.netty.channel.ChannelPipeline; * * This makes it easier to access the added encoder later in the {@link ChannelPipeline}. */ -public interface WebSocketFrameDecoder extends ChannelInboundHandler { +public interface WebSocketFrameDecoder extends ChannelHandler { } diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java index 74502fbb38..f62be40d03 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java @@ -20,7 +20,6 @@ import io.netty.channel.Channel; import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandler; import io.netty.channel.ChannelPipeline; import io.netty.handler.codec.http.DefaultFullHttpResponse; import io.netty.handler.codec.http.FullHttpRequest; @@ -47,7 +46,7 @@ import static io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConf * to the io.netty.example.http.websocketx.server.WebSocketServer example. * * To know once a handshake was done you can intercept the - * {@link ChannelInboundHandler#userEventTriggered(ChannelHandlerContext, Object)} and check if the event was instance + * {@link ChannelHandler#userEventTriggered(ChannelHandlerContext, Object)} and check if the event was instance * of {@link HandshakeComplete}, the event will contain extra information about the handshake such as the request and * selected subprotocol. */ diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java index 61249d3fd0..fbd499f10b 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java @@ -17,8 +17,8 @@ package io.netty.handler.codec.http.websocketx; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandler; import io.netty.channel.ChannelPipeline; import io.netty.channel.ChannelPromise; import io.netty.handler.codec.http.DefaultFullHttpResponse; @@ -42,7 +42,7 @@ import static io.netty.handler.codec.http.HttpVersion.*; /** * Handles the HTTP handshake (the HTTP Upgrade request) for {@link WebSocketServerProtocolHandler}. */ -class WebSocketServerProtocolHandshakeHandler implements ChannelInboundHandler { +class WebSocketServerProtocolHandshakeHandler implements ChannelHandler { private final WebSocketServerProtocolConfig serverConfig; private ChannelHandlerContext ctx; diff --git a/codec-http/src/test/java/io/netty/handler/codec/http/HttpClientUpgradeHandlerTest.java b/codec-http/src/test/java/io/netty/handler/codec/http/HttpClientUpgradeHandlerTest.java index f52d90adb1..4604c40afc 100644 --- a/codec-http/src/test/java/io/netty/handler/codec/http/HttpClientUpgradeHandlerTest.java +++ b/codec-http/src/test/java/io/netty/handler/codec/http/HttpClientUpgradeHandlerTest.java @@ -15,8 +15,8 @@ */ package io.netty.handler.codec.http; +import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandler; import io.netty.channel.embedded.EmbeddedChannel; import java.util.Collection; @@ -58,7 +58,7 @@ public class HttpClientUpgradeHandlerTest { } } - private static final class UserEventCatcher implements ChannelInboundHandler { + private static final class UserEventCatcher implements ChannelHandler { private Object evt; public Object getUserEvent() { diff --git a/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java b/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java index 72fc963536..e1c1a7d19a 100644 --- a/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java +++ b/codec-http/src/test/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandlerTest.java @@ -18,7 +18,6 @@ package io.netty.handler.codec.http.websocketx; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandler; import io.netty.channel.ChannelPromise; import io.netty.channel.embedded.EmbeddedChannel; import io.netty.handler.codec.http.DefaultFullHttpRequest; @@ -391,7 +390,7 @@ public class WebSocketServerProtocolHandlerTest { } } - private static class CustomTextFrameHandler implements ChannelInboundHandler { + private static class CustomTextFrameHandler implements ChannelHandler { private String content; @Override diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameCodec.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameCodec.java index 4b275eb071..f10574d288 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameCodec.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2FrameCodec.java @@ -17,8 +17,8 @@ package io.netty.handler.codec.http2; import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; +import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelInboundHandler; import io.netty.channel.ChannelPromise; import io.netty.handler.codec.UnsupportedMessageTypeException; import io.netty.handler.codec.http.HttpServerUpgradeHandler.UpgradeEvent; @@ -126,7 +126,7 @@ import static io.netty.handler.codec.http2.Http2Error.NO_ERROR; * *
* Returns the maximum number of messages to read per read loop. - * a {@link ChannelInboundHandler#channelRead(ChannelHandlerContext, Object) channelRead()} event. + * a {@link ChannelHandler#channelRead(ChannelHandlerContext, Object) channelRead()} event. * If this value is greater than 1, an event loop might attempt to read multiple times to procure multiple messages. */ @Deprecated diff --git a/transport/src/main/java/io/netty/channel/ChannelHandlerContext.java b/transport/src/main/java/io/netty/channel/ChannelHandlerContext.java index a47f1bd2b7..112c36b0a9 100644 --- a/transport/src/main/java/io/netty/channel/ChannelHandlerContext.java +++ b/transport/src/main/java/io/netty/channel/ChannelHandlerContext.java @@ -82,7 +82,7 @@ import java.nio.channels.Channels; * as how many times it is added to pipelines, regardless if it is added to the * same pipeline multiple times or added to different pipelines multiple times: *
- * public class FactorialHandler implements {@link ChannelInboundHandler} { + * public class FactorialHandler implements {@link ChannelHandler} { * * private final {@link AttributeKey}<{@link Integer}> counter = {@link AttributeKey}.valueOf("counter"); * diff --git a/transport/src/main/java/io/netty/channel/ChannelInboundInvoker.java b/transport/src/main/java/io/netty/channel/ChannelInboundInvoker.java index 5a04ae9baa..f0123f2019 100644 --- a/transport/src/main/java/io/netty/channel/ChannelInboundInvoker.java +++ b/transport/src/main/java/io/netty/channel/ChannelInboundInvoker.java @@ -20,8 +20,8 @@ public interface ChannelInboundInvoker { /** * A {@link Channel} was registered to its {@link EventLoop}. * - * This will result in having the {@link ChannelInboundHandler#channelRegistered(ChannelHandlerContext)} method - * called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the + * This will result in having the {@link ChannelHandler#channelRegistered(ChannelHandlerContext)} method + * called of the next {@link ChannelHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ ChannelInboundInvoker fireChannelRegistered(); @@ -29,8 +29,8 @@ public interface ChannelInboundInvoker { /** * A {@link Channel} was unregistered from its {@link EventLoop}. * - * This will result in having the {@link ChannelInboundHandler#channelUnregistered(ChannelHandlerContext)} method - * called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the + * This will result in having the {@link ChannelHandler#channelUnregistered(ChannelHandlerContext)} method + * called of the next {@link ChannelHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ ChannelInboundInvoker fireChannelUnregistered(); @@ -38,8 +38,8 @@ public interface ChannelInboundInvoker { /** * A {@link Channel} is active now, which means it is connected. * - * This will result in having the {@link ChannelInboundHandler#channelActive(ChannelHandlerContext)} method - * called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the + * This will result in having the {@link ChannelHandler#channelActive(ChannelHandlerContext)} method + * called of the next {@link ChannelHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ ChannelInboundInvoker fireChannelActive(); @@ -47,8 +47,8 @@ public interface ChannelInboundInvoker { /** * A {@link Channel} is inactive now, which means it is closed. * - * This will result in having the {@link ChannelInboundHandler#channelInactive(ChannelHandlerContext)} method - * called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the + * This will result in having the {@link ChannelHandler#channelInactive(ChannelHandlerContext)} method + * called of the next {@link ChannelHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ ChannelInboundInvoker fireChannelInactive(); @@ -56,8 +56,8 @@ public interface ChannelInboundInvoker { /** * A {@link Channel} received an {@link Throwable} in one of its inbound operations. * - * This will result in having the {@link ChannelInboundHandler#exceptionCaught(ChannelHandlerContext, Throwable)} - * method called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the + * This will result in having the {@link ChannelHandler#exceptionCaught(ChannelHandlerContext, Throwable)} + * method called of the next {@link ChannelHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ ChannelInboundInvoker fireExceptionCaught(Throwable cause); @@ -65,8 +65,8 @@ public interface ChannelInboundInvoker { /** * A {@link Channel} received an user defined event. * - * This will result in having the {@link ChannelInboundHandler#userEventTriggered(ChannelHandlerContext, Object)} - * method called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the + * This will result in having the {@link ChannelHandler#userEventTriggered(ChannelHandlerContext, Object)} + * method called of the next {@link ChannelHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ ChannelInboundInvoker fireUserEventTriggered(Object event); @@ -74,21 +74,21 @@ public interface ChannelInboundInvoker { /** * A {@link Channel} received a message. * - * This will result in having the {@link ChannelInboundHandler#channelRead(ChannelHandlerContext, Object)} - * method called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the + * This will result in having the {@link ChannelHandler#channelRead(ChannelHandlerContext, Object)} + * method called of the next {@link ChannelHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ ChannelInboundInvoker fireChannelRead(Object msg); /** - * Triggers an {@link ChannelInboundHandler#channelReadComplete(ChannelHandlerContext)} - * event to the next {@link ChannelInboundHandler} in the {@link ChannelPipeline}. + * Triggers an {@link ChannelHandler#channelReadComplete(ChannelHandlerContext)} + * event to the next {@link ChannelHandler} in the {@link ChannelPipeline}. */ ChannelInboundInvoker fireChannelReadComplete(); /** - * Triggers an {@link ChannelInboundHandler#channelWritabilityChanged(ChannelHandlerContext)} - * event to the next {@link ChannelInboundHandler} in the {@link ChannelPipeline}. + * Triggers an {@link ChannelHandler#channelWritabilityChanged(ChannelHandlerContext)} + * event to the next {@link ChannelHandler} in the {@link ChannelPipeline}. */ ChannelInboundInvoker fireChannelWritabilityChanged(); } diff --git a/transport/src/main/java/io/netty/channel/ChannelInitializer.java b/transport/src/main/java/io/netty/channel/ChannelInitializer.java index 810891b233..a82e804fd5 100644 --- a/transport/src/main/java/io/netty/channel/ChannelInitializer.java +++ b/transport/src/main/java/io/netty/channel/ChannelInitializer.java @@ -22,7 +22,7 @@ import io.netty.util.internal.logging.InternalLogger; import io.netty.util.internal.logging.InternalLoggerFactory; /** - * A special {@link ChannelInboundHandler} which offers an easy way to initialize a {@link Channel} once it was + * A special {@link ChannelHandler} which offers an easy way to initialize a {@link Channel} once it was * registered to its {@link EventLoop}. * * Implementations are most often used in the context of {@link Bootstrap#handler(ChannelHandler)} , @@ -47,7 +47,7 @@ import io.netty.util.internal.logging.InternalLoggerFactory; * @paramA sub-type of {@link Channel} */ @Sharable -public abstract class ChannelInitializer implements ChannelInboundHandler { +public abstract class ChannelInitializer implements ChannelHandler { private static final InternalLogger logger = InternalLoggerFactory.getInstance(ChannelInitializer.class); diff --git a/transport/src/main/java/io/netty/channel/ChannelOutboundInvoker.java b/transport/src/main/java/io/netty/channel/ChannelOutboundInvoker.java index 5263cbe5df..fab719286a 100644 --- a/transport/src/main/java/io/netty/channel/ChannelOutboundInvoker.java +++ b/transport/src/main/java/io/netty/channel/ChannelOutboundInvoker.java @@ -179,8 +179,8 @@ public interface ChannelOutboundInvoker { * The given {@link ChannelPromise} will be notified. * * This will result in having the - * {@link ChannelOutboundHandler#close(ChannelHandlerContext, ChannelPromise)} - * method called of the next {@link ChannelOutboundHandler} contained in the {@link ChannelPipeline} of the + * {@link ChannelHandler#close(ChannelHandlerContext, ChannelPromise)} + * method called of the next {@link ChannelHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ ChannelFuture close(ChannelPromise promise); @@ -193,8 +193,8 @@ public interface ChannelOutboundInvoker { * The given {@link ChannelPromise} will be notified. *
* This will result in having the - * {@link ChannelOutboundHandler#register(ChannelHandlerContext, ChannelPromise)} - * method called of the next {@link ChannelOutboundHandler} contained in the {@link ChannelPipeline} of the + * {@link ChannelHandler#register(ChannelHandlerContext, ChannelPromise)} + * method called of the next {@link ChannelHandler} contained in the {@link ChannelPipeline} of the * {@link Channel}. */ ChannelFuture register(ChannelPromise promise); diff --git a/transport/src/main/java/io/netty/channel/CombinedChannelDuplexHandler.java b/transport/src/main/java/io/netty/channel/CombinedChannelDuplexHandler.java index 6b9d000432..72a3130534 100644 --- a/transport/src/main/java/io/netty/channel/CombinedChannelDuplexHandler.java +++ b/transport/src/main/java/io/netty/channel/CombinedChannelDuplexHandler.java @@ -103,7 +103,7 @@ public class CombinedChannelDuplexHandler, String>> nameCaches = new FastThreadLocal