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.look.netty.demo.client.WebSocketClientHandler.java

public class WebSocketClientHandler extends SimpleChannelInboundHandler<Object> {

    private final WebSocketClientHandshaker handshaker;
    private ChannelPromise handshakeFuture;

    public WebSocketClientHandler(WebSocketClientHandshaker handshaker) {

From source file com.look.netty.demo.rxtx.RxtxClientHandler.java

public class RxtxClientHandler extends SimpleChannelInboundHandler<String> {

    @Override
    public void channelActive(ChannelHandlerContext ctx) {
        ctx.writeAndFlush("AT\n");
    }

From source file com.look.netty.demo.securechat.SecureChatClientHandler.java

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

    @Override

From source file com.look.netty.demo.securechat.SecureChatServerHandler.java

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

    static final ChannelGroup channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);

From source file com.look.netty.demo.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;

From source file com.look.netty.demo.snoop.HttpSnoopServerHandler.java

public class HttpSnoopServerHandler extends SimpleChannelInboundHandler<Object> {

    private HttpRequest request;
    /** Buffer that stores the response content */
    private final StringBuilder buf = new StringBuilder();

From source file com.look.netty.demo.socksproxy.SocksServerConnectHandler.java

@ChannelHandler.Sharable
public final class SocksServerConnectHandler extends SimpleChannelInboundHandler<SocksMessage> {

    private final Bootstrap b = new Bootstrap();

    @Override

From source file com.look.netty.demo.socksproxy.SocksServerHandler.java

@ChannelHandler.Sharable
public final class SocksServerHandler extends SimpleChannelInboundHandler<SocksMessage> {

    public static final SocksServerHandler INSTANCE = new SocksServerHandler();

    private SocksServerHandler() {

From source file com.look.netty.demo.spdy.client.HttpResponseClientHandler.java

/**
 * This is a modified version of {@link HttpSnoopClientHandler} that uses a {@link java.util.concurrent.BlockingQueue} to wait until an
 * HTTPResponse is received.
 */
public class HttpResponseClientHandler extends SimpleChannelInboundHandler<HttpObject> {

From source file com.look.netty.demo.spdy.server.SpdyServerHandler.java

/**
 * HTTP handler that responds with a "Hello World"
 */
public class SpdyServerHandler extends SimpleChannelInboundHandler<Object> {

    @Override