|
|
|
@ -105,6 +105,12 @@ class BaseConfig<T extends BaseConfig<T>> {
|
|
|
|
|
|
|
|
|
|
private String sslKeystorePassword;
|
|
|
|
|
|
|
|
|
|
private boolean pingConnection;
|
|
|
|
|
|
|
|
|
|
private boolean keepAlive;
|
|
|
|
|
|
|
|
|
|
private boolean tcpNoDelay;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BaseConfig() {
|
|
|
|
|
}
|
|
|
|
@ -127,6 +133,9 @@ class BaseConfig<T extends BaseConfig<T>> {
|
|
|
|
|
setSslTruststorePassword(config.getSslTruststorePassword());
|
|
|
|
|
setSslKeystore(config.getSslKeystore());
|
|
|
|
|
setSslKeystorePassword(config.getSslKeystorePassword());
|
|
|
|
|
setPingConnection(config.isPingConnection());
|
|
|
|
|
setKeepAlive(config.isKeepAlive());
|
|
|
|
|
setTcpNoDelay(config.isTcpNoDelay());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -332,7 +341,7 @@ class BaseConfig<T extends BaseConfig<T>> {
|
|
|
|
|
/**
|
|
|
|
|
* Enables SSL endpoint identification.
|
|
|
|
|
* <p>
|
|
|
|
|
* Default is true
|
|
|
|
|
* Default is <code>true</code>
|
|
|
|
|
*
|
|
|
|
|
* @param sslEnableEndpointIdentification - boolean value
|
|
|
|
|
* @return config
|
|
|
|
@ -419,6 +428,57 @@ class BaseConfig<T extends BaseConfig<T>> {
|
|
|
|
|
return (T) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean isPingConnection() {
|
|
|
|
|
return pingConnection;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Enables PING command sending during connection initialization
|
|
|
|
|
* <p>
|
|
|
|
|
* Default is <code>false</code>
|
|
|
|
|
*
|
|
|
|
|
* @param pingConnection - boolean value
|
|
|
|
|
* @return config
|
|
|
|
|
*/
|
|
|
|
|
public T setPingConnection(boolean pingConnection) {
|
|
|
|
|
this.pingConnection = pingConnection;
|
|
|
|
|
return (T) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean isKeepAlive() {
|
|
|
|
|
return keepAlive;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Enables TCP keepAlive for connection
|
|
|
|
|
* <p>
|
|
|
|
|
* Default is <code>false</code>
|
|
|
|
|
*
|
|
|
|
|
* @param keepAlive - boolean value
|
|
|
|
|
* @return config
|
|
|
|
|
*/
|
|
|
|
|
public T setKeepAlive(boolean keepAlive) {
|
|
|
|
|
this.keepAlive = keepAlive;
|
|
|
|
|
return (T) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean isTcpNoDelay() {
|
|
|
|
|
return tcpNoDelay;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Enables TCP noDelay for connection
|
|
|
|
|
* <p>
|
|
|
|
|
* Default is <code>false</code>
|
|
|
|
|
*
|
|
|
|
|
* @param tcpNoDelay - boolean value
|
|
|
|
|
* @return config
|
|
|
|
|
*/
|
|
|
|
|
public T setTcpNoDelay(boolean tcpNoDelay) {
|
|
|
|
|
this.tcpNoDelay = tcpNoDelay;
|
|
|
|
|
return (T) this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|