Example usage for io.netty.channel SimpleChannelInboundHandler subclass-usage

List of usage examples for io.netty.channel SimpleChannelInboundHandler subclass-usage

Introduction

In this page you can find the example usage for io.netty.channel SimpleChannelInboundHandler subclass-usage.

Usage

From source file com.flowpowered.network.pipeline.MessageHandler.java

/**
 * A {@link SimpleChannelInboundHandler} which processes incoming network events.
 */
public class MessageHandler extends SimpleChannelInboundHandler<Message> {
    /**
     * The associated session

From source file com.flowpowered.networking.pipeline.MessageHandler.java

/**
 * A {@link SimpleChannelUpstreamHandler} which processes incoming network events.
 */
public class MessageHandler extends SimpleChannelInboundHandler<Message> {
    /**
     * The associated session

From source file com.flysoloing.learning.network.netty.discard.DiscardClientHandler.java

/**
 * Handles a client-side channel.
 */
public class DiscardClientHandler extends SimpleChannelInboundHandler<Object> {

    private ByteBuf content;

From source file com.flysoloing.learning.network.netty.discard.DiscardServerHandler.java

/**
 * Handles a server-side channel.
 */
public class DiscardServerHandler extends SimpleChannelInboundHandler<Object> {

    @Override

From source file com.flysoloing.learning.network.netty.factorial.FactorialClientHandler.java

/**
 * Handler for a client-side channel.  This handler maintains stateful
 * information which is specific to a certain channel using member variables.
 * Therefore, an instance of this handler can cover only one channel.  You have
 * to create a new handler instance whenever you create a new channel and insert
 * this handler to avoid a race condition.

From source file com.flysoloing.learning.network.netty.factorial.FactorialServerHandler.java

/**
 * Handler for a server-side channel.  This handler maintains stateful
 * information which is specific to a certain channel using member variables.
 * Therefore, an instance of this handler can cover only one channel.  You have
 * to create a new handler instance whenever you create a new channel and insert
 * this handler  to avoid a race condition.

From source file com.flysoloing.learning.network.netty.file.FileServerHandler.java

public class FileServerHandler extends SimpleChannelInboundHandler<String> {

    @Override
    public void channelActive(ChannelHandlerContext ctx) {
        ctx.writeAndFlush("HELO: Type the path of the file to retrieve.\n");
    }

From source file com.flysoloing.learning.network.netty.http.cors.OkResponseHandler.java

/**
 * A simple handler which will simple return a successful Http
 * response for any request.
 */
public class OkResponseHandler extends SimpleChannelInboundHandler<Object> {
    @Override

From source file com.flysoloing.learning.network.netty.http.file.HttpStaticFileServerHandler.java

/**
 * A simple handler that serves incoming HTTP requests to send their respective
 * HTTP responses.  It also implements {@code 'If-Modified-Since'} header to
 * take advantage of browser cache, as described in
 * <a href="http://tools.ietf.org/html/rfc2616#section-14.25">RFC 2616</a>.
 *

From source file com.flysoloing.learning.network.netty.http.snoop.HttpSnoopClientHandler.java

public class HttpSnoopClientHandler extends SimpleChannelInboundHandler<HttpObject> {

    @Override
    public void channelRead0(ChannelHandlerContext ctx, HttpObject msg) {
        if (msg instanceof HttpResponse) {
            HttpResponse response = (HttpResponse) msg;