com.github.ltsopensource.nio.channel.ChannelInitializer Maven / Gradle / Ivy
package com.github.ltsopensource.nio.channel;
import com.github.ltsopensource.nio.codec.Decoder;
import com.github.ltsopensource.nio.codec.Encoder;
/**
* @author Robert HG ([email protected]) on 2/16/16.
*/
public abstract class ChannelInitializer {
public void initChannel(NioChannel ch) {
NioChannelImpl channel = (NioChannelImpl)ch;
channel.setDecoder(getDecoder());
channel.setEncoder(getEncoder());
}
protected abstract Decoder getDecoder();
protected abstract Encoder getEncoder();
}