Interface IAttachProperties<T extends IAttachProperties>
- 
- All Known Subinterfaces:
- IConnectionProperties,- IServiceProperties
 - All Known Implementing Classes:
- AbstractAttachProperties,- AbstractImmutableAttachProperties,- FbConnectionProperties,- FbImmutableConnectionProperties,- FbImmutableServiceProperties,- FbServiceProperties
 
 public interface IAttachProperties<T extends IAttachProperties>Common properties for database and service attach.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_CONNECT_TIMEOUTstatic intDEFAULT_PORTstatic java.lang.StringDEFAULT_SERVER_NAMEstatic intDEFAULT_SO_TIMEOUTstatic intDEFAULT_SOCKET_BUFFER_SIZE
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description TasImmutable()TasNewMutable()java.lang.StringgetAttachObjectName()java.lang.StringgetAuthPlugins()Get the list of authentication plugins to try.java.lang.StringgetCharSet()intgetConnectTimeout()Get the connect timeout in seconds.java.lang.StringgetDbCryptConfig()Get the database encryption plugin configuration.java.lang.StringgetEncoding()java.lang.StringgetPassword()intgetPortNumber()Get the portnumber of the server.java.lang.StringgetRoleName()java.lang.StringgetServerName()Get the hostname or IP address of the Firebird server.intgetSocketBufferSize()Get the socket buffer size.intgetSoTimeout()Get the initial Socket blocking timeout (SoTimeout).java.lang.StringgetUser()WireCryptgetWireCrypt()Get the wire encryption level.booleanisWireCompression()Get if wire compression should be enabled.voidsetAuthPlugins(java.lang.String authPlugins)Sets the authentication plugins to try.voidsetCharSet(java.lang.String charSet)Set the Java character set for the connection.voidsetConnectTimeout(int connectTimeout)Set the connect timeout in seconds.voidsetDbCryptConfig(java.lang.String dbCryptConfig)Sets the database encryption plugin configuration.voidsetEncoding(java.lang.String encoding)Set the Firebird character set for the connection.voidsetPassword(java.lang.String password)voidsetPortNumber(int portNumber)Set the port number of the server.voidsetRoleName(java.lang.String roleName)voidsetServerName(java.lang.String serverName)Set the hostname or IP address of the Firebird server.voidsetSocketBufferSize(int socketBufferSize)Set the socket buffer size.voidsetSoTimeout(int soTimeout)Set the initial Socket blocking timeout (SoTimeout).voidsetUser(java.lang.String user)voidsetWireCompression(boolean wireCompression)Sets if the connection should try to enable wire compression.voidsetWireCrypt(WireCrypt wireCrypt)Set the wire encryption level.
 
- 
- 
- 
Field Detail- 
DEFAULT_PORTstatic final int DEFAULT_PORT - See Also:
- Constant Field Values
 
 - 
DEFAULT_SERVER_NAMEstatic final java.lang.String DEFAULT_SERVER_NAME - See Also:
- Constant Field Values
 
 - 
DEFAULT_SOCKET_BUFFER_SIZEstatic final int DEFAULT_SOCKET_BUFFER_SIZE - See Also:
- Constant Field Values
 
 - 
DEFAULT_SO_TIMEOUTstatic final int DEFAULT_SO_TIMEOUT - See Also:
- Constant Field Values
 
 - 
DEFAULT_CONNECT_TIMEOUTstatic final int DEFAULT_CONNECT_TIMEOUT - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getAttachObjectNamejava.lang.String getAttachObjectName() - Returns:
- The name of the object to attach to (either a database or service name).
 
 - 
getServerNamejava.lang.String getServerName() Get the hostname or IP address of the Firebird server.NOTE: Implementer should take care to return DEFAULT_SERVER_NAMEif value hasn't been set yet.- Returns:
- Hostname or IP address of the server
 
 - 
setServerNamevoid setServerName(java.lang.String serverName) Set the hostname or IP address of the Firebird server.NOTE: Implementer should take care to use DEFAULT_SERVER_NAMEif value hasn't been set yet.- Parameters:
- serverName- Hostname or IP address of the server
 
 - 
getPortNumberint getPortNumber() Get the portnumber of the server.NOTE: Implementer should take care to return DEFAULT_PORTif value hasn't been set yet.- Returns:
- Portnumber of the server
 
 - 
setPortNumbervoid setPortNumber(int portNumber) Set the port number of the server.NOTE: Implementer should take care to use the DEFAULT_PORTif this method hasn't been called yet.- Parameters:
- portNumber- Port number of the server
 
 - 
getUserjava.lang.String getUser() - Returns:
- Name of the user to authenticate to the server.
 
 - 
setUservoid setUser(java.lang.String user) - Parameters:
- user- Name of the user to authenticate to the server.
 
 - 
getPasswordjava.lang.String getPassword() - Returns:
- Password to authenticate to the server.
 
 - 
setPasswordvoid setPassword(java.lang.String password) - Parameters:
- password- Password to authenticate to the server.
 
 - 
getRoleNamejava.lang.String getRoleName() - Returns:
- SQL role to use.
 
 - 
setRoleNamevoid setRoleName(java.lang.String roleName) - Parameters:
- roleName- SQL role to use.
 
 - 
getCharSetjava.lang.String getCharSet() - Returns:
- Java character set for the connection.
 
 - 
setCharSetvoid setCharSet(java.lang.String charSet) Set the Java character set for the connection.Contrary to other parts of the codebase, the value of encodingshould not be changed whencharSetis set.- Parameters:
- charSet- Character set for the connection. Similar to- encodingproperty, but accepts Java names instead of Firebird ones.
- See Also:
- setEncoding(String)
 
 - 
getEncodingjava.lang.String getEncoding() - Returns:
- Firebird character encoding for the connection.
 
 - 
setEncodingvoid setEncoding(java.lang.String encoding) Set the Firebird character set for the connection.Contrary to other parts of the codebase, the value of charSetshould not be changed whenencodingis set.- Parameters:
- encoding- Firebird character encoding for the connection. See Firebird documentation for more information.
 
 - 
getSocketBufferSizeint getSocketBufferSize() Get the socket buffer size.NOTE: Implementer should take care to return DEFAULT_SOCKET_BUFFER_SIZEif the value hasn't been set yet.- Returns:
- socket buffer size in bytes, or -1 if not specified.
 
 - 
setSocketBufferSizevoid setSocketBufferSize(int socketBufferSize) Set the socket buffer size.NOTE: Implementer should take care to use DEFAULT_SOCKET_BUFFER_SIZEif the value hasn't been set yet.- Parameters:
- socketBufferSize- socket buffer size in bytes.
 
 - 
getSoTimeoutint getSoTimeout() Get the initial Socket blocking timeout (SoTimeout).NOTE: Implementer should take care to return DEFAULT_SO_TIMEOUTif the value hasn't been set yet.- Returns:
- The initial socket blocking timeout in milliseconds (0 is 'infinite')
 
 - 
setSoTimeoutvoid setSoTimeout(int soTimeout) Set the initial Socket blocking timeout (SoTimeout).NOTE: Implementer should take care to use DEFAULT_SO_TIMEOUTif the value hasn't been set yet.- Parameters:
- soTimeout- Timeout in milliseconds (0 is 'infinite')
 
 - 
getConnectTimeoutint getConnectTimeout() Get the connect timeout in seconds.NOTE: Implementer should take care to return DEFAULT_CONNECT_TIMEOUTif the value hasn't been set yet.- Returns:
- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)
 
 - 
setConnectTimeoutvoid setConnectTimeout(int connectTimeout) Set the connect timeout in seconds.NOTE: Implementer should take care to use DEFAULT_CONNECT_TIMEOUTif the value hasn't been set yet.- Parameters:
- connectTimeout- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)
 
 - 
getWireCryptWireCrypt getWireCrypt() Get the wire encryption level.NOTE: Implementer should take care to return WireCrypt.DEFAULTif the value hasn't been set yet.- Returns:
- Wire encryption level
- Since:
- 4.0
 
 - 
setWireCryptvoid setWireCrypt(WireCrypt wireCrypt) Set the wire encryption level.NOTE: Implementer should take care to use WireCrypt.DEFAULTif the value hasn't been set yet.- Parameters:
- wireCrypt- Wire encryption level (- nullnot allowed)
- Since:
- 4.0
 
 - 
getDbCryptConfigjava.lang.String getDbCryptConfig() Get the database encryption plugin configuration.- Returns:
- Database encryption plugin configuration, meaning plugin specific
- Since:
- 3.0.4
 
 - 
setDbCryptConfigvoid setDbCryptConfig(java.lang.String dbCryptConfig) Sets the database encryption plugin configuration.- Parameters:
- dbCryptConfig- Database encryption plugin configuration, meaning plugin specific
- Since:
- 3.0.4
 
 - 
getAuthPluginsjava.lang.String getAuthPlugins() Get the list of authentication plugins to try.- Returns:
- comma-separated list of authentication plugins, or nullfor driver default
- Since:
- 4.0
 
 - 
setAuthPluginsvoid setAuthPlugins(java.lang.String authPlugins) Sets the authentication plugins to try.Invalid names are skipped during authentication. - Parameters:
- authPlugins- comma-separated list of authentication plugins, or- nullfor driver default
- Since:
- 4.0
 
 - 
isWireCompressionboolean isWireCompression() Get if wire compression should be enabled.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.confread by the client library will be used.- Returns:
- truewire compression enabled
- Since:
- 4.0
 
 - 
setWireCompressionvoid setWireCompression(boolean wireCompression) Sets if the connection should try to enable wire compression.- Parameters:
- wireCompression-- trueenable wire compression,- falsedisable wire compression (the default)
- Since:
- 4.0
- See Also:
- isWireCompression()
 
 - 
asImmutableT asImmutable() - Returns:
- An immutable version of this instance as an implementation of IAttachProperties
 
 - 
asNewMutableT asNewMutable() - Returns:
- A new, mutable, instance as an implementation of IAttachPropertieswith all properties copied.
 
 
- 
 
-