Class AbstractAttachProperties<T extends IAttachProperties<T>>
- java.lang.Object
- 
- org.firebirdsql.gds.ng.AbstractAttachProperties<T>
 
- 
- All Implemented Interfaces:
- IAttachProperties<T>
 - Direct Known Subclasses:
- FbConnectionProperties,- FbServiceProperties
 
 public abstract class AbstractAttachProperties<T extends IAttachProperties<T>> extends java.lang.Object implements IAttachProperties<T> Abstract mutable implementation ofIAttachProperties.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Field Summary- 
Fields inherited from interface org.firebirdsql.gds.ng.IAttachPropertiesDEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT, DEFAULT_SERVER_NAME, DEFAULT_SO_TIMEOUT, DEFAULT_SOCKET_BUFFER_SIZE
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractAttachProperties()Default constructor for AbstractAttachPropertiesprotectedAbstractAttachProperties(IAttachProperties<T> src)Copy constructor for IAttachProperties.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddirtied()Called by setters if they have been called.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.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.firebirdsql.gds.ng.IAttachPropertiesasImmutable, asNewMutable, getAttachObjectName
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractAttachPropertiesprotected AbstractAttachProperties(IAttachProperties<T> src) Copy constructor for IAttachProperties.All properties defined in IAttachPropertiesare copied fromsrcto the new instance.- Parameters:
- src- Source to copy from
 
 - 
AbstractAttachPropertiesprotected AbstractAttachProperties() Default constructor for AbstractAttachProperties
 
- 
 - 
Method Detail- 
getServerNamepublic java.lang.String getServerName() Description copied from interface:IAttachPropertiesGet the hostname or IP address of the Firebird server.NOTE: Implementer should take care to return IAttachProperties.DEFAULT_SERVER_NAMEif value hasn't been set yet.- Specified by:
- getServerNamein interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- Hostname or IP address of the server
 
 - 
setServerNamepublic void setServerName(java.lang.String serverName) Description copied from interface:IAttachPropertiesSet the hostname or IP address of the Firebird server.NOTE: Implementer should take care to use IAttachProperties.DEFAULT_SERVER_NAMEif value hasn't been set yet.- Specified by:
- setServerNamein interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- serverName- Hostname or IP address of the server
 
 - 
getPortNumberpublic int getPortNumber() Description copied from interface:IAttachPropertiesGet the portnumber of the server.NOTE: Implementer should take care to return IAttachProperties.DEFAULT_PORTif value hasn't been set yet.- Specified by:
- getPortNumberin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- Portnumber of the server
 
 - 
setPortNumberpublic void setPortNumber(int portNumber) Description copied from interface:IAttachPropertiesSet the port number of the server.NOTE: Implementer should take care to use the IAttachProperties.DEFAULT_PORTif this method hasn't been called yet.- Specified by:
- setPortNumberin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- portNumber- Port number of the server
 
 - 
getUserpublic java.lang.String getUser() - Specified by:
- getUserin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- Name of the user to authenticate to the server.
 
 - 
setUserpublic void setUser(java.lang.String user) - Specified by:
- setUserin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- user- Name of the user to authenticate to the server.
 
 - 
getPasswordpublic java.lang.String getPassword() - Specified by:
- getPasswordin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- Password to authenticate to the server.
 
 - 
setPasswordpublic void setPassword(java.lang.String password) - Specified by:
- setPasswordin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- password- Password to authenticate to the server.
 
 - 
getRoleNamepublic java.lang.String getRoleName() - Specified by:
- getRoleNamein interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- SQL role to use.
 
 - 
setRoleNamepublic void setRoleName(java.lang.String roleName) - Specified by:
- setRoleNamein interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- roleName- SQL role to use.
 
 - 
getCharSetpublic java.lang.String getCharSet() - Specified by:
- getCharSetin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- Java character set for the connection.
 
 - 
setCharSetpublic void setCharSet(java.lang.String charSet) Description copied from interface:IAttachPropertiesSet the Java character set for the connection.Contrary to other parts of the codebase, the value of encodingshould not be changed whencharSetis set.- Specified by:
- setCharSetin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- charSet- Character set for the connection. Similar to- encodingproperty, but accepts Java names instead of Firebird ones.
- See Also:
- IAttachProperties.setEncoding(String)
 
 - 
getEncodingpublic java.lang.String getEncoding() - Specified by:
- getEncodingin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- Firebird character encoding for the connection.
 
 - 
setEncodingpublic void setEncoding(java.lang.String encoding) Description copied from interface:IAttachPropertiesSet the Firebird character set for the connection.Contrary to other parts of the codebase, the value of charSetshould not be changed whenencodingis set.- Specified by:
- setEncodingin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- encoding- Firebird character encoding for the connection. See Firebird documentation for more information.
 
 - 
getSocketBufferSizepublic int getSocketBufferSize() Description copied from interface:IAttachPropertiesGet the socket buffer size.NOTE: Implementer should take care to return IAttachProperties.DEFAULT_SOCKET_BUFFER_SIZEif the value hasn't been set yet.- Specified by:
- getSocketBufferSizein interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- socket buffer size in bytes, or -1 if not specified.
 
 - 
setSocketBufferSizepublic void setSocketBufferSize(int socketBufferSize) Description copied from interface:IAttachPropertiesSet the socket buffer size.NOTE: Implementer should take care to use IAttachProperties.DEFAULT_SOCKET_BUFFER_SIZEif the value hasn't been set yet.- Specified by:
- setSocketBufferSizein interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- socketBufferSize- socket buffer size in bytes.
 
 - 
getSoTimeoutpublic int getSoTimeout() Description copied from interface:IAttachPropertiesGet the initial Socket blocking timeout (SoTimeout).NOTE: Implementer should take care to return IAttachProperties.DEFAULT_SO_TIMEOUTif the value hasn't been set yet.- Specified by:
- getSoTimeoutin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- The initial socket blocking timeout in milliseconds (0 is 'infinite')
 
 - 
setSoTimeoutpublic void setSoTimeout(int soTimeout) Description copied from interface:IAttachPropertiesSet the initial Socket blocking timeout (SoTimeout).NOTE: Implementer should take care to use IAttachProperties.DEFAULT_SO_TIMEOUTif the value hasn't been set yet.- Specified by:
- setSoTimeoutin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- soTimeout- Timeout in milliseconds (0 is 'infinite')
 
 - 
getConnectTimeoutpublic int getConnectTimeout() Description copied from interface:IAttachPropertiesGet the connect timeout in seconds.NOTE: Implementer should take care to return IAttachProperties.DEFAULT_CONNECT_TIMEOUTif the value hasn't been set yet.- Specified by:
- getConnectTimeoutin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)
 
 - 
setConnectTimeoutpublic void setConnectTimeout(int connectTimeout) Description copied from interface:IAttachPropertiesSet the connect timeout in seconds.NOTE: Implementer should take care to use IAttachProperties.DEFAULT_CONNECT_TIMEOUTif the value hasn't been set yet.- Specified by:
- setConnectTimeoutin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- connectTimeout- Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)
 
 - 
getWireCryptpublic WireCrypt getWireCrypt() Description copied from interface:IAttachPropertiesGet the wire encryption level.NOTE: Implementer should take care to return WireCrypt.DEFAULTif the value hasn't been set yet.- Specified by:
- getWireCryptin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- Wire encryption level
 
 - 
setWireCryptpublic void setWireCrypt(WireCrypt wireCrypt) Description copied from interface:IAttachPropertiesSet the wire encryption level.NOTE: Implementer should take care to use WireCrypt.DEFAULTif the value hasn't been set yet.- Specified by:
- setWireCryptin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- wireCrypt- Wire encryption level (- nullnot allowed)
 
 - 
getDbCryptConfigpublic java.lang.String getDbCryptConfig() Description copied from interface:IAttachPropertiesGet the database encryption plugin configuration.- Specified by:
- getDbCryptConfigin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- Database encryption plugin configuration, meaning plugin specific
 
 - 
setDbCryptConfigpublic void setDbCryptConfig(java.lang.String dbCryptConfig) Description copied from interface:IAttachPropertiesSets the database encryption plugin configuration.- Specified by:
- setDbCryptConfigin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- dbCryptConfig- Database encryption plugin configuration, meaning plugin specific
 
 - 
getAuthPluginspublic java.lang.String getAuthPlugins() Description copied from interface:IAttachPropertiesGet the list of authentication plugins to try.- Specified by:
- getAuthPluginsin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- comma-separated list of authentication plugins, or nullfor driver default
 
 - 
setAuthPluginspublic void setAuthPlugins(java.lang.String authPlugins) Description copied from interface:IAttachPropertiesSets the authentication plugins to try.Invalid names are skipped during authentication. - Specified by:
- setAuthPluginsin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- authPlugins- comma-separated list of authentication plugins, or- nullfor driver default
 
 - 
isWireCompressionpublic boolean isWireCompression() Description copied from interface:IAttachPropertiesGet 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.- Specified by:
- isWireCompressionin interface- IAttachProperties<T extends IAttachProperties<T>>
- Returns:
- truewire compression enabled
 
 - 
setWireCompressionpublic void setWireCompression(boolean wireCompression) Description copied from interface:IAttachPropertiesSets if the connection should try to enable wire compression.- Specified by:
- setWireCompressionin interface- IAttachProperties<T extends IAttachProperties<T>>
- Parameters:
- wireCompression-- trueenable wire compression,- falsedisable wire compression (the default)
- See Also:
- IAttachProperties.isWireCompression()
 
 - 
dirtiedprotected abstract void dirtied() Called by setters if they have been called.
 
- 
 
-