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 String |
PROTOCOL_TCP |
static String |
PROTOCOL_TCPS |
static String |
PROTOCOL_WSS |
static String |
SERVER_MODE_DEDICATED |
static String |
SERVER_MODE_POOLED |
static 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(String host,
int port)
Creating a new ConnectInfo using the given host and port value and adds to
the ConnectInfoList.
|
String |
build()
Builds the TNS ConnectString using the provided values and returns
the built value.
|
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(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(String serverDN)
Used to configure the value of SSL_SERVER_CERT_DN in the SECURITY node.
|
OracleConnectionStringBuilder |
serverMode(String serverMode)
Used to configure the value of SERVER in the CONNECT_DATA node.
|
OracleConnectionStringBuilder |
serviceName(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(String walletDirectory)
Used to configure the value of MY_WALLET_DIRECTORY in the SECURITY node.
|
static final String SERVER_MODE_DEDICATED
static final String SERVER_MODE_SHARED
static final String SERVER_MODE_POOLED
static final String PROTOCOL_TCP
static final String PROTOCOL_TCPS
static final String PROTOCOL_WSS
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(String host, int port)
addConnectInfo(ConnectInfo)
.host
- port
- #addConnectInfo(ConnectInfo)}
OracleConnectionStringBuilder serviceName(String serviceName)
serviceName
- OracleConnectionStringBuilder serverMode(String serverMode)
SERVER_MODE_DEDICATED
SERVER_MODE_POOLED
SERVER_MODE_SHARED
serverMode
- OracleConnectionStringBuilder instanceName(String instanceName)
instanceName
- OracleConnectionStringBuilder serverDN(String serverDN)
serverDN
- OracleConnectionStringBuilder walletDirectory(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
- String build() throws IllegalStateException
IllegalStateException
if any
of values provided for building the connect string is invalid.IllegalStateException
#buildThinStyleURL()}
String buildThinStyleURL() throws IllegalStateException
build()
, but It adds the prefix
required by the JDBC Thin Driver to resolve the driver type.IllegalStateException