public abstract class AbstractImmutableAttachProperties<T extends IAttachProperties<T>> extends java.lang.Object implements IAttachProperties<T>
IAttachProperties
.DEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT, DEFAULT_SERVER_NAME, DEFAULT_SO_TIMEOUT, DEFAULT_SOCKET_BUFFER_SIZE
Modifier | Constructor and Description |
---|---|
protected |
AbstractImmutableAttachProperties(IAttachProperties<T> src)
Copy constructor for IAttachProperties.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAuthPlugins()
Get the list of authentication plugins to try.
|
java.lang.String |
getCharSet() |
int |
getConnectTimeout()
Get the connect timeout in seconds.
|
java.lang.String |
getDbCryptConfig()
Get the database encryption plugin configuration.
|
java.lang.String |
getEncoding() |
java.lang.String |
getPassword() |
int |
getPortNumber()
Get the portnumber of the server.
|
java.lang.String |
getRoleName() |
java.lang.String |
getServerName()
Get the hostname or IP address of the Firebird server.
|
int |
getSocketBufferSize()
Get the socket buffer size.
|
int |
getSoTimeout()
Get the initial Socket blocking timeout (SoTimeout).
|
java.lang.String |
getUser() |
WireCrypt |
getWireCrypt()
Get the wire encryption level.
|
protected void |
immutable()
Throws an UnsupportedOperationException
|
boolean |
isWireCompression()
Get if wire compression should be enabled.
|
void |
setAuthPlugins(java.lang.String authPlugins)
Sets the authentication plugins to try.
|
void |
setCharSet(java.lang.String charSet)
Set the Java character set for the connection.
|
void |
setConnectTimeout(int connectTimeout)
Set the connect timeout in seconds.
|
void |
setDbCryptConfig(java.lang.String dbCryptConfig)
Sets the database encryption plugin configuration.
|
void |
setEncoding(java.lang.String encoding)
Set the Firebird character set for the connection.
|
void |
setPassword(java.lang.String password) |
void |
setPortNumber(int portNumber)
Set the port number of the server.
|
void |
setRoleName(java.lang.String roleName) |
void |
setServerName(java.lang.String serverName)
Set the hostname or IP address of the Firebird server.
|
void |
setSocketBufferSize(int socketBufferSize)
Set the socket buffer size.
|
void |
setSoTimeout(int soTimeout)
Set the initial Socket blocking timeout (SoTimeout).
|
void |
setUser(java.lang.String user) |
void |
setWireCompression(boolean wireCompression)
Sets if the connection should try to enable wire compression.
|
void |
setWireCrypt(WireCrypt wireCrypt)
Set the wire encryption level.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asImmutable, asNewMutable, getAttachObjectName
protected AbstractImmutableAttachProperties(IAttachProperties<T> src)
All properties defined in IAttachProperties
are copied
from src
to the new instance.
src
- Source to copy frompublic java.lang.String getServerName()
IAttachProperties
NOTE: Implementer should take care to return IAttachProperties.DEFAULT_SERVER_NAME
if value hasn't been set yet.
getServerName
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setServerName(java.lang.String serverName)
IAttachProperties
NOTE: Implementer should take care to use IAttachProperties.DEFAULT_SERVER_NAME
if
value hasn't been set yet.
setServerName
in interface IAttachProperties<T extends IAttachProperties<T>>
serverName
- Hostname or IP address of the serverpublic int getPortNumber()
IAttachProperties
NOTE: Implementer should take care to return IAttachProperties.DEFAULT_PORT
if
value hasn't been set yet.
getPortNumber
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setPortNumber(int portNumber)
IAttachProperties
NOTE: Implementer should take care to use the IAttachProperties.DEFAULT_PORT
if
this method hasn't been called yet.
setPortNumber
in interface IAttachProperties<T extends IAttachProperties<T>>
portNumber
- Port number of the serverpublic java.lang.String getUser()
getUser
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setUser(java.lang.String user)
setUser
in interface IAttachProperties<T extends IAttachProperties<T>>
user
- Name of the user to authenticate to the server.public java.lang.String getPassword()
getPassword
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setPassword(java.lang.String password)
setPassword
in interface IAttachProperties<T extends IAttachProperties<T>>
password
- Password to authenticate to the server.public java.lang.String getRoleName()
getRoleName
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setRoleName(java.lang.String roleName)
setRoleName
in interface IAttachProperties<T extends IAttachProperties<T>>
roleName
- SQL role to use.public java.lang.String getCharSet()
getCharSet
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setCharSet(java.lang.String charSet)
IAttachProperties
Contrary to other parts of the codebase, the value of
encoding
should not be changed when charSet
is
set.
setCharSet
in interface IAttachProperties<T extends IAttachProperties<T>>
charSet
- Character set for the connection. Similar to
encoding
property, but accepts Java names instead
of Firebird ones.IAttachProperties.setEncoding(String)
public java.lang.String getEncoding()
getEncoding
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setEncoding(java.lang.String encoding)
IAttachProperties
Contrary to other parts of the codebase, the value of
charSet
should not be changed when encoding
is
set.
setEncoding
in interface IAttachProperties<T extends IAttachProperties<T>>
encoding
- Firebird character encoding for the connection. See Firebird
documentation for more information.public int getSocketBufferSize()
IAttachProperties
NOTE: Implementer should take care to return IAttachProperties.DEFAULT_SOCKET_BUFFER_SIZE
if the
value hasn't been set yet.
getSocketBufferSize
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setSocketBufferSize(int socketBufferSize)
IAttachProperties
NOTE: Implementer should take care to use IAttachProperties.DEFAULT_SOCKET_BUFFER_SIZE
if the
value hasn't been set yet.
setSocketBufferSize
in interface IAttachProperties<T extends IAttachProperties<T>>
socketBufferSize
- socket buffer size in bytes.public int getSoTimeout()
IAttachProperties
NOTE: Implementer should take care to return IAttachProperties.DEFAULT_SO_TIMEOUT
if the
value hasn't been set yet.
getSoTimeout
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setSoTimeout(int soTimeout)
IAttachProperties
NOTE: Implementer should take care to use IAttachProperties.DEFAULT_SO_TIMEOUT
if the
value hasn't been set yet.
setSoTimeout
in interface IAttachProperties<T extends IAttachProperties<T>>
soTimeout
- Timeout in milliseconds (0 is 'infinite')public int getConnectTimeout()
IAttachProperties
NOTE: Implementer should take care to return IAttachProperties.DEFAULT_CONNECT_TIMEOUT
if the
value hasn't been set yet.
getConnectTimeout
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setConnectTimeout(int connectTimeout)
IAttachProperties
NOTE: Implementer should take care to use IAttachProperties.DEFAULT_CONNECT_TIMEOUT
if the
value hasn't been set yet.
setConnectTimeout
in interface IAttachProperties<T extends IAttachProperties<T>>
connectTimeout
- Connect timeout in seconds (0 is 'infinite', or better: OS
specific timeout)public WireCrypt getWireCrypt()
IAttachProperties
NOTE: Implementer should take care to return WireCrypt.DEFAULT
if
the value hasn't been set yet.
getWireCrypt
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setWireCrypt(WireCrypt wireCrypt)
IAttachProperties
NOTE: Implementer should take care to use WireCrypt.DEFAULT
if
the value hasn't been set yet.
setWireCrypt
in interface IAttachProperties<T extends IAttachProperties<T>>
wireCrypt
- Wire encryption level (null
not allowed)public java.lang.String getDbCryptConfig()
IAttachProperties
getDbCryptConfig
in interface IAttachProperties<T extends IAttachProperties<T>>
public void setDbCryptConfig(java.lang.String dbCryptConfig)
IAttachProperties
setDbCryptConfig
in interface IAttachProperties<T extends IAttachProperties<T>>
dbCryptConfig
- Database encryption plugin configuration, meaning plugin specificpublic java.lang.String getAuthPlugins()
IAttachProperties
getAuthPlugins
in interface IAttachProperties<T extends IAttachProperties<T>>
null
for driver defaultpublic void setAuthPlugins(java.lang.String authPlugins)
IAttachProperties
Invalid names are skipped during authentication.
setAuthPlugins
in interface IAttachProperties<T extends IAttachProperties<T>>
authPlugins
- comma-separated list of authentication plugins, or null
for driver defaultpublic boolean isWireCompression()
IAttachProperties
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.
isWireCompression
in interface IAttachProperties<T extends IAttachProperties<T>>
true
wire compression enabledpublic void setWireCompression(boolean wireCompression)
IAttachProperties
setWireCompression
in interface IAttachProperties<T extends IAttachProperties<T>>
wireCompression
- true
enable wire compression, false
disable wire compression (the default)IAttachProperties.isWireCompression()
protected final void immutable()
Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.