diff --git a/example/src/main/java/io/netty/example/spdy/SpdyServerHandler.java b/example/src/main/java/io/netty/example/spdy/SpdyServerHandler.java index 889796fb31..3a431306ab 100644 --- a/example/src/main/java/io/netty/example/spdy/SpdyServerHandler.java +++ b/example/src/main/java/io/netty/example/spdy/SpdyServerHandler.java @@ -20,8 +20,8 @@ import java.util.Date; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelFutureListener; -import io.netty.channel.ChannelHandlerAdapter; import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; import io.netty.handler.codec.http.DefaultFullHttpResponse; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpRequest; @@ -35,14 +35,14 @@ import static io.netty.handler.codec.http.HttpVersion.*; /** * HTTP handler that responds with a "Hello World" */ -public class SpdyServerHandler extends ChannelHandlerAdapter { +public class SpdyServerHandler extends SimpleChannelInboundHandler { @Override public void channelReadComplete(ChannelHandlerContext ctx) { ctx.flush(); } @Override - public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { + public void messageReceived(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof HttpRequest) { HttpRequest req = (HttpRequest) msg;