
com.github.tonivade.resp.RespInitializerHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resp-server Show documentation
Show all versions of resp-server Show documentation
Netty implementation of REdis Serialization Protocol, and a simple framework to implement command based protocols
/*
* Copyright (c) 2015-2019, Antonio Gabriel Muñoz Conejo
* Distributed under the terms of the MIT License
*/
package com.github.tonivade.resp;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
class RespInitializerHandler extends ChannelInitializer {
private final Resp impl;
RespInitializerHandler(Resp 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 - 2025 Weber Informatics LLC | Privacy Policy