public interface AttachmentProperties extends BaseProperties
Modifier and Type | Method and Description |
---|---|
default java.lang.String |
getAuthPlugins()
Get the list of authentication plugins to try.
|
default java.lang.String |
getCharSet()
Java character set configured for the connection.
|
default int |
getConnectTimeout()
Get the connect timeout in seconds.
|
default java.lang.String |
getDbCryptConfig()
Get the database encryption plugin configuration.
|
default java.lang.String |
getEncoding()
Firebird character set configured for the connection.
|
default int |
getParallelWorkers() |
default java.lang.String |
getPassword() |
default int |
getPortNumber()
Get the port number of the server.
|
default java.lang.Integer |
getProcessId() |
default java.lang.String |
getProcessName() |
default java.lang.String |
getRoleName() |
default java.lang.String |
getServerName()
Get the hostname or IP address of the Firebird server.
|
default int |
getSocketBufferSize()
Get the socket buffer size.
|
default int |
getSoTimeout()
Get the initial Socket blocking timeout (SoTimeout).
|
default java.lang.String |
getType() |
default java.lang.String |
getUser() |
default java.lang.String |
getWireCrypt()
Get the wire encryption level.
|
default boolean |
isWireCompression()
Get if wire compression should be enabled.
|
default void |
setAuthPlugins(java.lang.String authPlugins)
Sets the authentication plugins to try.
|
default void |
setCharSet(java.lang.String charSet)
Set the Java character set for the connection.
|
default void |
setConnectTimeout(int connectTimeout)
Set the connect timeout in seconds.
|
default void |
setDbCryptConfig(java.lang.String dbCryptConfig)
Sets the database encryption plugin configuration.
|
default void |
setEncoding(java.lang.String encoding)
Set the Firebird character set for the connection.
|
default void |
setParallelWorkers(int parallelWorkers)
Sets the number of parallel workers of the connection.
|
default void |
setPassword(java.lang.String password) |
default void |
setPortNumber(int portNumber)
Set the port number of the server.
|
default void |
setProcessId(java.lang.Integer processId)
Sets a custom process id to send to Firebird on attach.
|
default void |
setProcessName(java.lang.String processName)
Sets a custom process name to send to Firebird on attach
|
default void |
setRoleName(java.lang.String roleName) |
default void |
setServerName(java.lang.String serverName)
Set the hostname or IP address of the Firebird server.
|
default void |
setSocketBufferSize(int socketBufferSize)
Set the socket buffer size.
|
default void |
setSoTimeout(int soTimeout)
Set the initial Socket blocking timeout (SoTimeout).
|
default void |
setType(java.lang.String type) |
default void |
setUser(java.lang.String user) |
default void |
setWireCompression(boolean wireCompression)
Sets if the connection should try to enable wire compression.
|
default void |
setWireCrypt(java.lang.String wireCrypt)
Set the wire encryption level.
|
connectionPropertyValues, getBooleanProperty, getBooleanProperty, getIntProperty, getIntProperty, getProperty, getProperty, setBooleanProperty, setIntProperty, setProperty
default java.lang.String getServerName()
setServerName(String)
default void setServerName(java.lang.String serverName)
When set to null
(the default), the databaseName
or serviceName
is used as the full
identification of the database host, port and database path/alias. Protocol implementations, for example
PURE_JAVA
, may default to localhost
when this property is null
, but
databaseName
/serviceName
does not (seem to) contain a host name.
serverName
- Hostname or IP address of the serverdefault int getPortNumber()
setPortNumber(int)
default void setPortNumber(int portNumber)
Defaults to 3050
. This property value will be ignored if serverName
is null
, unless the
protocol implementation needs a hostname, but cannot find a hostname in databaseName
/serviceName
.
portNumber
- Port number of the serversetServerName(String)
default java.lang.String getType()
default void setType(java.lang.String type)
type
- type of the connection, for example, "PURE_JAVA", "NATIVE", "EMBEDDED", depends on the GDS
implementations installed in the system.java.lang.IllegalStateException
- may be thrown when type cannot or can no longer be changeddefault java.lang.String getUser()
default void setUser(java.lang.String user)
user
- Name of the user to authenticate to the server.default java.lang.String getPassword()
default void setPassword(java.lang.String password)
password
- Password to authenticate to the server.default java.lang.String getRoleName()
default void setRoleName(java.lang.String roleName)
roleName
- SQL role to use.default java.lang.String getCharSet()
After connect, the actual Java character set applied can be obtained from
FbAttachment.getEncoding()
(property charsetName
), or FbAttachment.getEncodingFactory()
(properties defaultEncoding.charsetName
or {code defaultEncodingDefinition.javaCharset}).
null
when not explicitly configured).default void setCharSet(java.lang.String charSet)
It is possible to set both the charSet
and encoding
to achieve a character set conversion effect,
but in general only one of both properties should be set.
charSet
- Character set for the connection. Similar to encoding
property, but accepts Java names instead
of Firebird ones.setEncoding(String)
default java.lang.String getEncoding()
After connect, the actual Firebird character set applied can be obtained from
FbAttachment.getEncodingFactory()
, property defaultEncodingDefinition.firebirdEncodingName
.
null
when not explicitly configured).default void setEncoding(java.lang.String encoding)
It is possible to set both the charSet
and encoding
to achieve a character set conversion effect,
but in general only one of both properties should be set.
encoding
- Firebird character encoding for the connection. See Firebird documentation for more information.setCharSet(String)
default java.lang.Integer getProcessId()
null
means the default is applied (read from
system property org.firebirdsql.jdbc.pid
, future versions may also determine the actual process id)default void setProcessId(java.lang.Integer processId)
processId
- The process id to send; null
to apply the default behaviour (see getProcessId()
)default java.lang.String getProcessName()
null
means the default is applied (read from
system property org.firebirdsql.jdbc.processName
)default void setProcessName(java.lang.String processName)
processName
- The process name to send; null
to apply the default behaviour (see getProcessName()
)default int getSocketBufferSize()
-1
if not setdefault void setSocketBufferSize(int socketBufferSize)
socketBufferSize
- socket buffer size in bytes.default int getSoTimeout()
-1
if not setdefault void setSoTimeout(int soTimeout)
soTimeout
- Timeout in milliseconds (0 is 'infinite')default int getConnectTimeout()
-1
if not setdefault void setConnectTimeout(int connectTimeout)
connectTimeout
- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)default java.lang.String getWireCrypt()
default void setWireCrypt(java.lang.String wireCrypt)
Values are defined by WireCrypt
, values are handled case insensitive. Invalid values will throw an
exception.
wireCrypt
- Wire encryption level (null
not allowed)InvalidPropertyValueException
- If the value is not one of the allowed valuesdefault java.lang.String getDbCryptConfig()
default void setDbCryptConfig(java.lang.String dbCryptConfig)
dbCryptConfig
- Database encryption plugin configuration, meaning plugin specificdefault java.lang.String getAuthPlugins()
default void setAuthPlugins(java.lang.String authPlugins)
Invalid names are skipped during authentication.
authPlugins
- comma-separated list of authentication pluginsdefault boolean isWireCompression()
Wire compression requires Firebird 3 or higher, and the server must have the zlib library. If compression cannot be negotiated, the connection will be made without wire compression.
This property will be ignored for native connections. For native connections, the configuration in
firebird.conf
read by the client library will be used.
true
wire compression enableddefault void setWireCompression(boolean wireCompression)
wireCompression
- true
enable wire compression, false
disable wire compression (the default)isWireCompression()
default int getParallelWorkers()
-1
means no value was set (or it was explicitly set to -1
)default void setParallelWorkers(int parallelWorkers)
Requires Firebird 5.0 or higher, and a Firebird server configured with MaxParallelWorkers
higher than
specified by parallelWorkers
.
NOTE: For service attachments, this property controls behaviour only for specific operations, and requires Jaybird to explicitly set the parallel workers for that operation.
parallelWorkers
- number of parallel workersCopyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.