public interface OracleConnectionStringBuilder
| Modifier and Type | Interface and Description |
|---|---|
static class |
OracleConnectionStringBuilder.ConnectInfo
This class represents the ADDRESS node of the TNS Connect String.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROTOCOL_BEQ |
static java.lang.String |
PROTOCOL_TCP |
static java.lang.String |
PROTOCOL_TCPS |
static java.lang.String |
PROTOCOL_WSS |
static java.lang.String |
SERVER_MODE_DEDICATED |
static java.lang.String |
SERVER_MODE_POOLED |
static java.lang.String |
SERVER_MODE_SHARED |
| Modifier and Type | Method and Description |
|---|---|
OracleConnectionStringBuilder |
addConnectInfo(OracleConnectionStringBuilder.ConnectInfo connectInfo)
Adds the given ConnectInfo to the ConnectInfoList which will be used for
creating the TNS connect string.
|
OracleConnectionStringBuilder |
addConnectInfo(java.lang.String host,
int port)
Creating a new ConnectInfo using the given host and port value and adds to
the ConnectInfoList.
|
java.lang.String |
build()
Builds the TNS ConnectString using the provided values and returns
the built value.
|
java.lang.String |
buildThinStyleURL()
It works the same way as
build(), but It adds the prefix
required by the JDBC Thin Driver to resolve the driver type. |
OracleConnectionStringBuilder |
connectTimeout(int connectTimeout)
Used to configure the value of CONNECT_TIMEOUT in the DESCRIPTION node.
|
OracleConnectionStringBuilder |
instanceName(java.lang.String instanceName)
Used to configure the value of INSTANCE_NAME in the CONNECT_DATA node.
|
OracleConnectionStringBuilder |
loadBalance(boolean loadBalance)
Used to configure the value of LOAD_BALANCE in the ADDRESS_LIST node.
|
static OracleConnectionStringBuilder |
newInstance()
Factory method for creating a new instance of OracleConnectionBuilder.
|
OracleConnectionStringBuilder |
retryCount(int retryCount)
Used to configure the value of RETRY_COUNT in the DESCRIPTION node.
|
OracleConnectionStringBuilder |
retryDelay(int retryDelay)
Used to configure the value of RETRY_DELAY in the DESCRIPTION node.
|
OracleConnectionStringBuilder |
serverDN(java.lang.String serverDN)
Used to configure the value of SSL_SERVER_CERT_DN in the SECURITY node.
|
OracleConnectionStringBuilder |
serverMode(java.lang.String serverMode)
Used to configure the value of SERVER in the CONNECT_DATA node.
|
OracleConnectionStringBuilder |
serviceName(java.lang.String serviceName)
Used to configure the value of SERVICE_NAME of the CONNECT_DATA node.
|
OracleConnectionStringBuilder |
transportConnectTimeout(int transportConnectTimeout)
Used to configure the value of TRANSPORT_CONNECT_TIMEOUT in the DESCRIPTION node.
|
OracleConnectionStringBuilder |
walletDirectory(java.lang.String walletDirectory)
Used to configure the value of MY_WALLET_DIRECTORY in the SECURITY node.
|
static final java.lang.String SERVER_MODE_DEDICATED
static final java.lang.String SERVER_MODE_SHARED
static final java.lang.String SERVER_MODE_POOLED
static final java.lang.String PROTOCOL_TCP
static final java.lang.String PROTOCOL_TCPS
static final java.lang.String PROTOCOL_WSS
static final java.lang.String PROTOCOL_BEQ
static OracleConnectionStringBuilder newInstance()
OracleConnectionStringBuilder addConnectInfo(OracleConnectionStringBuilder.ConnectInfo connectInfo)
ConnectInfo connectInfo = ConnectInfo
.newInstance()
.host("mydbhost")
.port(5521)
.protocol(OracleConnectionStringBuilder.PROTOCOL_TCP);
connectInfo - #addConnectInfo(String, int)}OracleConnectionStringBuilder addConnectInfo(java.lang.String host, int port)
addConnectInfo(ConnectInfo).host - port - #addConnectInfo(ConnectInfo)}OracleConnectionStringBuilder serviceName(java.lang.String serviceName)
serviceName - OracleConnectionStringBuilder serverMode(java.lang.String serverMode)
SERVER_MODE_DEDICATED
SERVER_MODE_POOLED
SERVER_MODE_SHARED
serverMode - OracleConnectionStringBuilder instanceName(java.lang.String instanceName)
instanceName - OracleConnectionStringBuilder serverDN(java.lang.String serverDN)
serverDN - OracleConnectionStringBuilder walletDirectory(java.lang.String walletDirectory)
walletDirectory - OracleConnectionStringBuilder loadBalance(boolean loadBalance)
loadBalance - OracleConnectionStringBuilder connectTimeout(int connectTimeout)
connectTimeout - OracleConnectionStringBuilder transportConnectTimeout(int transportConnectTimeout)
transportConnectTimeout - OracleConnectionStringBuilder retryCount(int retryCount)
retryCount - OracleConnectionStringBuilder retryDelay(int retryDelay)
retryDelay - java.lang.String build()
throws java.lang.IllegalStateException
IllegalStateException if any
of values provided for building the connect string is invalid.java.lang.IllegalStateException#buildThinStyleURL()}java.lang.String buildThinStyleURL()
throws java.lang.IllegalStateException
build(), but It adds the prefix
required by the JDBC Thin Driver to resolve the driver type.java.lang.IllegalStateException