All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tonivade.redis.RedisInitializerHandler Maven / Gradle / Ivy

Go to download

Netty implementation of REdis Serialization Protocol, and a simple framework to implement command based protocols

There is a newer version: 0.24.0
Show newest version
/*
 * Copyright (c) 2015, Antonio Gabriel Muñoz Conejo 
 * Distributed under the terms of the MIT License
 */
package tonivade.redis;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

public class RedisInitializerHandler extends ChannelInitializer {

    private final IRedis impl;

    public RedisInitializerHandler(IRedis impl) {
        this.impl = impl;
    }

    @Override
    protected void initChannel(SocketChannel channel) throws Exception {
        impl.channel(channel);
    }

    @Override
    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
        impl.disconnected(ctx);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy