protected void configureProtocol(BaseIoServiceConfig config, boolean isServer) throws IOException {
ByteBuffer.setUseDirectBuffers(useDirectBuffersInMina);
config.getFilterChain().addLast("slowHandling", new SessionWriteQueueMonitoring(nioLogger, maxWriteQueueSize));
config.getFilterChain().addLast("codec",
new ProtocolCodecFilter(new CougarProtocolEncoder(nioLogger), new CougarProtocolDecoder(nioLogger)));
if (isServer) {
config.getFilterChain().addLast("protocol", CougarProtocol.getServerInstance(nioLogger, keepAliveInterval, keepAliveTimeout, null, false, false));
}