public class ProtocolFactoryImpl implements ProtocolFactory {
@Override
public Protocol connect(SocketAddress address, BasicContext context) throws IOException, NoticeException {
SSLMode sslMode = context.getSetting(SSL_MODE, new Converter<SSLMode>() {
@Override
public SSLMode apply(Object val) {
if (val == null)
return SSL_MODE_DEFAULT;