import io.netty.handler.ssl.SslHandler;
import io.netty.handler.timeout.IdleStateHandler;
import io.netty.handler.timeout.ReadTimeoutHandler;
-import io.netty.util.CharsetUtil;
import java.net.InetAddress;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
private static final String USE_SSL = "use-ssl";
private static final int RETRY_PERIOD = 100; // retry after 100 milliseconds
+ private static final StringEncoder UTF8_ENCODER = new StringEncoder(StandardCharsets.UTF_8);
+
private static final ScheduledExecutorService EXECUTOR_SERVICE = Executors.newScheduledThreadPool(10,
new ThreadFactoryBuilder().setNameFormat("OVSDBPassiveConnServ-%d").build());
channel.pipeline().addLast(
//new LoggingHandler(LogLevel.INFO),
new JsonRpcDecoder(jsonRpcDecoderMaxFrameLength),
- new StringEncoder(CharsetUtil.UTF_8),
+ UTF8_ENCODER,
new IdleStateHandler(IDLE_READER_TIMEOUT, 0, 0),
new ReadTimeoutHandler(READ_TIMEOUT),
new ExceptionHandler(OvsdbConnectionService.this));
channel.pipeline().addLast(
new JsonRpcDecoder(jsonRpcDecoderMaxFrameLength),
- new StringEncoder(CharsetUtil.UTF_8),
+ UTF8_ENCODER,
new IdleStateHandler(IDLE_READER_TIMEOUT, 0, 0),
new ReadTimeoutHandler(READ_TIMEOUT),
new ExceptionHandler(OvsdbConnectionService.this));