public class MSSQLConnectOptions extends SqlConnectOptions
MSSQLConnection.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_APP_NAME |
static String |
DEFAULT_CLIENT_INTERFACE_NAME |
static String |
DEFAULT_DATABASE |
static String |
DEFAULT_HOST |
static int |
DEFAULT_PACKET_SIZE |
static String |
DEFAULT_PASSWORD |
static int |
DEFAULT_PORT |
static Map<String,String> |
DEFAULT_PROPERTIES |
static String |
DEFAULT_USER |
static int |
MAX_PACKET_SIZE |
static int |
MIN_PACKET_SIZE |
DEFAULT_CACHE_PREPARED_STATEMENTS, DEFAULT_PREPARED_STATEMENT_CACHE_FILTER, DEFAULT_PREPARED_STATEMENT_CACHE_MAX_SIZE, DEFAULT_PREPARED_STATEMENT_CACHE_SQL_LIMITDEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL, DEFAULT_REGISTER_WRITE_HANDLERDEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALLDEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_READ_IDLE_TIMEOUT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_USE_ALPN, DEFAULT_WRITE_IDLE_TIMEOUTDEFAULT_LOG_ACTIVITY_FORMAT, DEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS| Constructor and Description |
|---|
MSSQLConnectOptions() |
MSSQLConnectOptions(JsonObject json) |
MSSQLConnectOptions(MSSQLConnectOptions other) |
MSSQLConnectOptions(SqlConnectOptions other) |
| Modifier and Type | Method and Description |
|---|---|
MSSQLConnectOptions |
addCrlPath(String crlPath)
Add a CRL path
|
MSSQLConnectOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
MSSQLConnectOptions |
addEnabledCipherSuite(String suite)
Add an enabled cipher suite, appended to the ordered suites.
|
MSSQLConnectOptions |
addEnabledSecureTransportProtocol(String protocol)
Add an enabled SSL/TLS protocols, appended to the ordered protocols.
|
MSSQLConnectOptions |
addProperty(String key,
String value)
Add a property for this client, which will be sent to server at the connection start.
|
static MSSQLConnectOptions |
fromUri(String connectionUri)
Provide a
MSSQLConnectOptions configured from a connection URI. |
int |
getPacketSize()
Get the desired size (in bytes) for TDS packets.
|
protected void |
init()
Initialize with the default options.
|
MSSQLConnectOptions |
merge(JsonObject other)
Returns new options created after this object and merged with the
other json config. |
MSSQLConnectOptions |
removeEnabledSecureTransportProtocol(String protocol)
Removes an enabled SSL/TLS protocol from the ordered protocols.
|
MSSQLConnectOptions |
setConnectTimeout(int connectTimeout)
Set the connect timeout
|
MSSQLConnectOptions |
setDatabase(String database)
Specify the default database for the connection.
|
MSSQLConnectOptions |
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Sets the list of enabled SSL/TLS protocols.
|
MSSQLConnectOptions |
setHost(String host)
Specify the host for connecting to the server.
|
MSSQLConnectOptions |
setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
Set the hostname verification algorithm interval
To disable hostname verification, set hostnameVerificationAlgorithm to an empty String
|
MSSQLConnectOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, default time unit is seconds.
|
MSSQLConnectOptions |
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Set the idle timeout unit.
|
MSSQLConnectOptions |
setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
MSSQLConnectOptions |
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.
|
MSSQLConnectOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
MSSQLConnectOptions |
setLocalAddress(String localAddress)
Set the local interface to bind for network connections.
|
MSSQLConnectOptions |
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
|
MSSQLConnectOptions |
setMetricsName(String metricsName)
Set the metrics name identifying the reported metrics, useful for grouping metrics
with the same name.
|
MSSQLConnectOptions |
setNonProxyHosts(List<String> nonProxyHosts)
Set a list of remote hosts that are not proxied when the client is configured to use a proxy.
|
MSSQLConnectOptions |
setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
MSSQLConnectOptions |
setPacketSize(int packetSize)
Set the desired size (in bytes) for TDS packets.
|
MSSQLConnectOptions |
setPassword(String password)
Specify the user password to be used for the authentication.
|
MSSQLConnectOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
MSSQLConnectOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
MSSQLConnectOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
MSSQLConnectOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
MSSQLConnectOptions |
setPort(int port)
Specify the port for connecting to the server.
|
MSSQLConnectOptions |
setProperties(Map<String,String> properties)
Set properties for this client, which will be sent to server at the connection start.
|
MSSQLConnectOptions |
setProxyOptions(ProxyOptions proxyOptions)
Set proxy options for connections via CONNECT proxy (e.g.
|
MSSQLConnectOptions |
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer size
|
MSSQLConnectOptions |
setReconnectAttempts(int attempts)
Set the value of reconnect attempts
|
MSSQLConnectOptions |
setReconnectInterval(long interval)
Set the reconnect interval
|
MSSQLConnectOptions |
setReuseAddress(boolean reuseAddress)
Set the value of reuse address
|
MSSQLConnectOptions |
setReusePort(boolean reusePort)
Set the value of reuse port.
|
MSSQLConnectOptions |
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer size
|
MSSQLConnectOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
MSSQLConnectOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
MSSQLConnectOptions |
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.
|
MSSQLConnectOptions |
setSslHandshakeTimeout(long sslHandshakeTimeout)
Set the SSL handshake timeout, default time unit is seconds.
|
MSSQLConnectOptions |
setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
Set the SSL handshake timeout unit.
|
MSSQLConnectOptions |
setTcpCork(boolean tcpCork)
Enable the
TCP_CORK option - only with linux native transport. |
MSSQLConnectOptions |
setTcpFastOpen(boolean tcpFastOpen)
Enable the
TCP_FASTOPEN option - only with linux native transport. |
MSSQLConnectOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
MSSQLConnectOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
MSSQLConnectOptions |
setTcpQuickAck(boolean tcpQuickAck)
Enable the
TCP_QUICKACK option - only with linux native transport. |
MSSQLConnectOptions |
setTracingPolicy(TracingPolicy tracingPolicy)
Set the tracing policy for the client behavior when Vert.x has tracing enabled.
|
MSSQLConnectOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
MSSQLConnectOptions |
setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted
|
MSSQLConnectOptions |
setTrustOptions(TrustOptions options)
Set the trust options.
|
MSSQLConnectOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java truststore
|
MSSQLConnectOptions |
setUseAlpn(boolean useAlpn)
Set the ALPN usage.
|
MSSQLConnectOptions |
setUser(String user)
Specify the user account to be used for the authentication.
|
JsonObject |
toJson()
Convert to JSON
|
static MSSQLConnectOptions |
wrap(SqlConnectOptions options) |
getCachePreparedStatements, getDatabase, getHost, getPassword, getPort, getPreparedStatementCacheMaxSize, getPreparedStatementCacheSqlFilter, getProperties, getSocketAddress, getTracingPolicy, getUser, isUsingDomainSocket, setCachePreparedStatements, setPreparedStatementCacheMaxSize, setPreparedStatementCacheSqlFilter, setPreparedStatementCacheSqlLimitaddNonProxyHost, getApplicationLayerProtocols, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, isRegisterWriteHandler, removeEnabledCipherSuite, setActivityLogDataFormat, setApplicationLayerProtocols, setReadIdleTimeout, setRegisterWriteHandler, setWriteIdleTimeoutgetConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getProxyOptions, isTrustAll, setTcpUserTimeoutgetCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getSslOptions, getTcpUserTimeout, getTrustOptions, getTrustStoreOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpngetActivityLogDataFormat, getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePortpublic static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final String DEFAULT_USER
public static final String DEFAULT_PASSWORD
public static final String DEFAULT_DATABASE
public static final String DEFAULT_APP_NAME
public static final String DEFAULT_CLIENT_INTERFACE_NAME
public static final int MIN_PACKET_SIZE
public static final int MAX_PACKET_SIZE
public static final int DEFAULT_PACKET_SIZE
public MSSQLConnectOptions()
public MSSQLConnectOptions(JsonObject json)
public MSSQLConnectOptions(SqlConnectOptions other)
public MSSQLConnectOptions(MSSQLConnectOptions other)
public static MSSQLConnectOptions wrap(SqlConnectOptions options)
options as MSSQL specific connect optionspublic static MSSQLConnectOptions fromUri(String connectionUri) throws IllegalArgumentException
MSSQLConnectOptions configured from a connection URI.connectionUri - the connection URI to configure fromMSSQLConnectOptions parsed from the connection URIIllegalArgumentException - when the connectionUri is in an invalid formatpublic MSSQLConnectOptions setHost(String host)
SqlConnectOptionssetHost in class SqlConnectOptionshost - the host to specifypublic MSSQLConnectOptions setPort(int port)
SqlConnectOptionssetPort in class SqlConnectOptionsport - the port to specifypublic MSSQLConnectOptions setUser(String user)
SqlConnectOptionssetUser in class SqlConnectOptionsuser - the user to specifypublic MSSQLConnectOptions setPassword(String password)
SqlConnectOptionssetPassword in class SqlConnectOptionspassword - the password to specifypublic MSSQLConnectOptions setDatabase(String database)
SqlConnectOptionssetDatabase in class SqlConnectOptionsdatabase - the database name to specifypublic MSSQLConnectOptions setProperties(Map<String,String> properties)
SqlConnectOptionssetProperties in class SqlConnectOptionsproperties - the value of properties to specifypublic MSSQLConnectOptions addProperty(String key, String value)
SqlConnectOptionsaddProperty in class SqlConnectOptionskey - the value of property keyvalue - the value of property valuepublic int getPacketSize()
public MSSQLConnectOptions setPacketSize(int packetSize)
The client will use the value as a parameter in the LOGIN7 packet. The server may or may not accept it.
packetSize - the desired packet size (in bytes)IllegalArgumentException - if packetSize is smaller than MIN_PACKET_SIZE or bigger than MAX_PACKET_SIZEpublic MSSQLConnectOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class NetClientOptionssendBufferSize - the buffers size, in bytespublic MSSQLConnectOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class NetClientOptionsreceiveBufferSize - the buffers size, in bytespublic MSSQLConnectOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class NetClientOptionsreuseAddress - the value of reuse addresspublic MSSQLConnectOptions setReusePort(boolean reusePort)
NetworkOptionssetReusePort in class NetClientOptionsreusePort - the value of reuse portpublic MSSQLConnectOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class NetClientOptionstrafficClass - the value of traffic classpublic MSSQLConnectOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptionssetTcpNoDelay in class NetClientOptionstcpNoDelay - true if TCP no delay is enabled (Nagle disabled)public MSSQLConnectOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptionssetTcpKeepAlive in class NetClientOptionstcpKeepAlive - true if TCP keep alive is enabledpublic MSSQLConnectOptions setSoLinger(int soLinger)
TCPSSLOptionssetSoLinger in class NetClientOptionssoLinger - true if SO_linger is enabledpublic MSSQLConnectOptions setIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setIdleTimeout in class NetClientOptionsidleTimeout - the timeoutpublic MSSQLConnectOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
TCPSSLOptionssetIdleTimeoutUnit in class NetClientOptionsidleTimeoutUnit - specify time unit.public MSSQLConnectOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptionssetKeyCertOptions in class NetClientOptionsoptions - the key store optionspublic MSSQLConnectOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class NetClientOptionsoptions - the key store in jks formatpublic MSSQLConnectOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptionssetPfxKeyCertOptions in class NetClientOptionsoptions - the key cert options in pfx formatpublic MSSQLConnectOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class NetClientOptionsoptions - the options in pem formatpublic MSSQLConnectOptions setTrustOptions(TrustOptions options)
TCPSSLOptionssetTrustOptions in class NetClientOptionsoptions - the trust optionspublic MSSQLConnectOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class NetClientOptionsoptions - the trust options in jks formatpublic MSSQLConnectOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class NetClientOptionsoptions - the trust options in pem formatpublic MSSQLConnectOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptionssetPfxTrustOptions in class NetClientOptionsoptions - the trust options in pfx formatpublic MSSQLConnectOptions addEnabledCipherSuite(String suite)
TCPSSLOptionsaddEnabledCipherSuite in class NetClientOptionssuite - the suiteTCPSSLOptions.getEnabledCipherSuites()public MSSQLConnectOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsaddEnabledSecureTransportProtocol in class NetClientOptionsprotocol - the SSL/TLS protocol to enablepublic MSSQLConnectOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsremoveEnabledSecureTransportProtocol in class NetClientOptionsprotocol - the SSL/TLS protocol to disablepublic MSSQLConnectOptions setUseAlpn(boolean useAlpn)
TCPSSLOptionssetUseAlpn in class NetClientOptionsuseAlpn - true when Application-Layer Protocol Negotiation should be usedpublic MSSQLConnectOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptionssetSslEngineOptions in class NetClientOptionssslEngineOptions - the ssl engine to usepublic MSSQLConnectOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions in class NetClientOptionspublic MSSQLConnectOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptionsTCP_FASTOPEN option - only with linux native transport.setTcpFastOpen in class NetClientOptionstcpFastOpen - the fast open valuepublic MSSQLConnectOptions setTcpCork(boolean tcpCork)
TCPSSLOptionsTCP_CORK option - only with linux native transport.setTcpCork in class NetClientOptionstcpCork - the cork valuepublic MSSQLConnectOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptionsTCP_QUICKACK option - only with linux native transport.setTcpQuickAck in class NetClientOptionstcpQuickAck - the quick ack valuepublic MSSQLConnectOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions in class NetClientOptionspublic MSSQLConnectOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptionsaddCrlPath in class NetClientOptionscrlPath - the pathNullPointerExceptionpublic MSSQLConnectOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptionsaddCrlValue in class NetClientOptionscrlValue - the valueNullPointerExceptionpublic MSSQLConnectOptions setTrustAll(boolean trustAll)
ClientOptionsBasesetTrustAll in class NetClientOptionstrustAll - true if all should be trustedpublic MSSQLConnectOptions setConnectTimeout(int connectTimeout)
ClientOptionsBasesetConnectTimeout in class NetClientOptionsconnectTimeout - connect timeout, in mspublic MSSQLConnectOptions setMetricsName(String metricsName)
ClientOptionsBasesetMetricsName in class NetClientOptionsmetricsName - the metrics namepublic MSSQLConnectOptions setReconnectAttempts(int attempts)
NetClientOptionssetReconnectAttempts in class NetClientOptionsattempts - the maximum number of reconnect attemptspublic MSSQLConnectOptions setReconnectInterval(long interval)
NetClientOptionssetReconnectInterval in class NetClientOptionsinterval - the reconnect interval in mspublic MSSQLConnectOptions setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
NetClientOptionssetHostnameVerificationAlgorithm in class NetClientOptionshostnameVerificationAlgorithm - should be HTTPS, LDAPS or an empty Stringpublic MSSQLConnectOptions setLogActivity(boolean logEnabled)
NetworkOptionssetLogActivity in class NetClientOptionslogEnabled - true for logging the network activitypublic MSSQLConnectOptions setProxyOptions(ProxyOptions proxyOptions)
ClientOptionsBasesetProxyOptions in class NetClientOptionsproxyOptions - proxy options objectpublic MSSQLConnectOptions setLocalAddress(String localAddress)
ClientOptionsBasesetLocalAddress in class NetClientOptionslocalAddress - the local addresspublic MSSQLConnectOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptionssetEnabledSecureTransportProtocols in class NetClientOptionsenabledSecureTransportProtocols - the SSL/TLS protocols to enablepublic MSSQLConnectOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
TCPSSLOptionssetSslHandshakeTimeout in class NetClientOptionssslHandshakeTimeout - the SSL handshake timeout to set, in millisecondspublic MSSQLConnectOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
TCPSSLOptionssetSslHandshakeTimeoutUnit in class NetClientOptionssslHandshakeTimeoutUnit - specify time unit.public MSSQLConnectOptions setTracingPolicy(TracingPolicy tracingPolicy)
SqlConnectOptionssetTracingPolicy in class SqlConnectOptionstracingPolicy - the tracing policypublic MSSQLConnectOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class NetClientOptionsssl - true if enabledpublic MSSQLConnectOptions setNonProxyHosts(List<String> nonProxyHosts)
ClientOptionsBasenonProxyHosts configuration.
Entries can use the * wildcard character for pattern matching, e.g *.example.com matches www.example.com.
setNonProxyHosts in class NetClientOptionsnonProxyHosts - the list of non proxies hostsprotected void init()
init in class SqlConnectOptionspublic JsonObject toJson()
ClientOptionsBasetoJson in class SqlConnectOptionspublic MSSQLConnectOptions merge(JsonObject other)
SqlConnectOptionsother json config.merge in class SqlConnectOptionsother - the other JSON objectother json configCopyright © 2023 Eclipse. All rights reserved.