public Builder setSocketFactory(final SocketFactory factory) {
            if (factory == null) {
                throw(new IllegalArgumentException("SocketFactory cannot be null"));
            }

            config.socketFactory = factory;
            return this;
        }