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_LIMIT
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL, DEFAULT_REGISTER_WRITE_HANDLER
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL
DEFAULT_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_KEEAPLIVE_INTERVAL_SECONDS, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_KEEPALIVE_COUNT, DEFAULT_TCP_KEEPALIVE_IDLE_SECONDS, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_TCP_USER_TIMEOUT, DEFAULT_USE_ALPN, DEFAULT_WRITE_IDLE_TIMEOUT
DEFAULT_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, setPreparedStatementCacheSqlLimit
addNonProxyHost, getApplicationLayerProtocols, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, isRegisterWriteHandler, removeEnabledCipherSuite, setActivityLogDataFormat, setApplicationLayerProtocols, setReadIdleTimeout, setRegisterWriteHandler, setWriteIdleTimeout
getConnectTimeout, getLocalAddress, getMetricsName, getNonProxyHosts, getProxyOptions, isTrustAll, setTcpUserTimeout
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getReadIdleTimeout, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getSslOptions, getTcpKeepAliveCount, getTcpKeepAliveIdleSeconds, getTcpKeepAliveIntervalSeconds, getTcpUserTimeout, getTrustOptions, getTrustStoreOptions, getWriteIdleTimeout, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, setTcpKeepAliveCount, setTcpKeepAliveIdleSeconds, setTcpKeepAliveIntervalSeconds
getActivityLogDataFormat, getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort
public 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)
SqlConnectOptions
setHost
in class SqlConnectOptions
host
- the host to specifypublic MSSQLConnectOptions setPort(int port)
SqlConnectOptions
setPort
in class SqlConnectOptions
port
- the port to specifypublic MSSQLConnectOptions setUser(String user)
SqlConnectOptions
setUser
in class SqlConnectOptions
user
- the user to specifypublic MSSQLConnectOptions setPassword(String password)
SqlConnectOptions
setPassword
in class SqlConnectOptions
password
- the password to specifypublic MSSQLConnectOptions setDatabase(String database)
SqlConnectOptions
setDatabase
in class SqlConnectOptions
database
- the database name to specifypublic MSSQLConnectOptions setProperties(Map<String,String> properties)
SqlConnectOptions
setProperties
in class SqlConnectOptions
properties
- the value of properties to specifypublic MSSQLConnectOptions addProperty(String key, String value)
SqlConnectOptions
addProperty
in class SqlConnectOptions
key
- 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_SIZE
public MSSQLConnectOptions setSendBufferSize(int sendBufferSize)
NetworkOptions
setSendBufferSize
in class NetClientOptions
sendBufferSize
- the buffers size, in bytespublic MSSQLConnectOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptions
setReceiveBufferSize
in class NetClientOptions
receiveBufferSize
- the buffers size, in bytespublic MSSQLConnectOptions setReuseAddress(boolean reuseAddress)
NetworkOptions
setReuseAddress
in class NetClientOptions
reuseAddress
- the value of reuse addresspublic MSSQLConnectOptions setReusePort(boolean reusePort)
NetworkOptions
setReusePort
in class NetClientOptions
reusePort
- the value of reuse portpublic MSSQLConnectOptions setTrafficClass(int trafficClass)
NetworkOptions
setTrafficClass
in class NetClientOptions
trafficClass
- the value of traffic classpublic MSSQLConnectOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptions
setTcpNoDelay
in class NetClientOptions
tcpNoDelay
- true if TCP no delay is enabled (Nagle disabled)public MSSQLConnectOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptions
setTcpKeepAlive
in class NetClientOptions
tcpKeepAlive
- true if TCP keep alive is enabledpublic MSSQLConnectOptions setSoLinger(int soLinger)
TCPSSLOptions
setSoLinger
in class NetClientOptions
soLinger
- true if SO_linger is enabledpublic MSSQLConnectOptions setIdleTimeout(int idleTimeout)
TCPSSLOptions
TCPSSLOptions.setIdleTimeoutUnit(TimeUnit)
setIdleTimeout
in class NetClientOptions
idleTimeout
- the timeoutpublic MSSQLConnectOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
TCPSSLOptions
setIdleTimeoutUnit
in class NetClientOptions
idleTimeoutUnit
- specify time unit.public MSSQLConnectOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptions
setKeyCertOptions
in class NetClientOptions
options
- the key store optionspublic MSSQLConnectOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptions
setKeyStoreOptions
in class NetClientOptions
options
- the key store in jks formatpublic MSSQLConnectOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptions
setPfxKeyCertOptions
in class NetClientOptions
options
- the key cert options in pfx formatpublic MSSQLConnectOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptions
setPemKeyCertOptions
in class NetClientOptions
options
- the options in pem formatpublic MSSQLConnectOptions setTrustOptions(TrustOptions options)
TCPSSLOptions
setTrustOptions
in class NetClientOptions
options
- the trust optionspublic MSSQLConnectOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptions
setTrustStoreOptions
in class NetClientOptions
options
- the trust options in jks formatpublic MSSQLConnectOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptions
setPemTrustOptions
in class NetClientOptions
options
- the trust options in pem formatpublic MSSQLConnectOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptions
setPfxTrustOptions
in class NetClientOptions
options
- the trust options in pfx formatpublic MSSQLConnectOptions addEnabledCipherSuite(String suite)
TCPSSLOptions
addEnabledCipherSuite
in class NetClientOptions
suite
- the suiteTCPSSLOptions.getEnabledCipherSuites()
public MSSQLConnectOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptions
addEnabledSecureTransportProtocol
in class NetClientOptions
protocol
- the SSL/TLS protocol to enablepublic MSSQLConnectOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptions
removeEnabledSecureTransportProtocol
in class NetClientOptions
protocol
- the SSL/TLS protocol to disablepublic MSSQLConnectOptions setUseAlpn(boolean useAlpn)
TCPSSLOptions
setUseAlpn
in class NetClientOptions
useAlpn
- true when Application-Layer Protocol Negotiation should be usedpublic MSSQLConnectOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptions
setSslEngineOptions
in class NetClientOptions
sslEngineOptions
- the ssl engine to usepublic MSSQLConnectOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions
in class NetClientOptions
public MSSQLConnectOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptions
TCP_FASTOPEN
option - only with linux native transport.setTcpFastOpen
in class NetClientOptions
tcpFastOpen
- the fast open valuepublic MSSQLConnectOptions setTcpCork(boolean tcpCork)
TCPSSLOptions
TCP_CORK
option - only with linux native transport.setTcpCork
in class NetClientOptions
tcpCork
- the cork valuepublic MSSQLConnectOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptions
TCP_QUICKACK
option - only with linux native transport.setTcpQuickAck
in class NetClientOptions
tcpQuickAck
- the quick ack valuepublic MSSQLConnectOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions
in class NetClientOptions
public MSSQLConnectOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptions
addCrlPath
in class NetClientOptions
crlPath
- the pathNullPointerException
public MSSQLConnectOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptions
addCrlValue
in class NetClientOptions
crlValue
- the valueNullPointerException
public MSSQLConnectOptions setTrustAll(boolean trustAll)
ClientOptionsBase
setTrustAll
in class NetClientOptions
trustAll
- true if all should be trustedpublic MSSQLConnectOptions setConnectTimeout(int connectTimeout)
ClientOptionsBase
setConnectTimeout
in class NetClientOptions
connectTimeout
- connect timeout, in mspublic MSSQLConnectOptions setMetricsName(String metricsName)
ClientOptionsBase
setMetricsName
in class NetClientOptions
metricsName
- the metrics namepublic MSSQLConnectOptions setReconnectAttempts(int attempts)
NetClientOptions
setReconnectAttempts
in class NetClientOptions
attempts
- the maximum number of reconnect attemptspublic MSSQLConnectOptions setReconnectInterval(long interval)
NetClientOptions
setReconnectInterval
in class NetClientOptions
interval
- the reconnect interval in mspublic MSSQLConnectOptions setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
NetClientOptions
setHostnameVerificationAlgorithm
in class NetClientOptions
hostnameVerificationAlgorithm
- should be HTTPS, LDAPS or an empty Stringpublic MSSQLConnectOptions setLogActivity(boolean logEnabled)
NetworkOptions
setLogActivity
in class NetClientOptions
logEnabled
- true for logging the network activitypublic MSSQLConnectOptions setProxyOptions(ProxyOptions proxyOptions)
ClientOptionsBase
setProxyOptions
in class NetClientOptions
proxyOptions
- proxy options objectpublic MSSQLConnectOptions setLocalAddress(String localAddress)
ClientOptionsBase
setLocalAddress
in class NetClientOptions
localAddress
- the local addresspublic MSSQLConnectOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptions
setEnabledSecureTransportProtocols
in class NetClientOptions
enabledSecureTransportProtocols
- the SSL/TLS protocols to enablepublic MSSQLConnectOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
TCPSSLOptions
setSslHandshakeTimeout
in class NetClientOptions
sslHandshakeTimeout
- the SSL handshake timeout to set, in millisecondspublic MSSQLConnectOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
TCPSSLOptions
setSslHandshakeTimeoutUnit
in class NetClientOptions
sslHandshakeTimeoutUnit
- specify time unit.public MSSQLConnectOptions setTracingPolicy(TracingPolicy tracingPolicy)
SqlConnectOptions
setTracingPolicy
in class SqlConnectOptions
tracingPolicy
- the tracing policypublic MSSQLConnectOptions setSsl(boolean ssl)
TCPSSLOptions
setSsl
in class NetClientOptions
ssl
- true if enabledpublic MSSQLConnectOptions setNonProxyHosts(List<String> nonProxyHosts)
ClientOptionsBase
nonProxyHosts
configuration.
Entries can use the * wildcard character for pattern matching, e.g *.example.com matches www.example.com.
setNonProxyHosts
in class NetClientOptions
nonProxyHosts
- the list of non proxies hostsprotected void init()
init
in class SqlConnectOptions
public JsonObject toJson()
ClientOptionsBase
toJson
in class SqlConnectOptions
public MSSQLConnectOptions merge(JsonObject other)
SqlConnectOptions
other
json config.merge
in class SqlConnectOptions
other
- the other JSON objectother
json configCopyright © 2024 Eclipse. All rights reserved.