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 Details

  • Method Details

    • getAttachObjectName

      String getAttachObjectName()
      Returns:
      The name of the object to attach to (either a database or service name).
    • getServerName

      String getServerName()
      Get the hostname or IP address of the Firebird server.

      NOTE: Implementer should take care to return DEFAULT_SERVER_NAME if value hasn't been set yet.

      Returns:
      Hostname or IP address of the server
    • setServerName

      void setServerName(String serverName)
      Set the hostname or IP address of the Firebird server.

      NOTE: Implementer should take care to use DEFAULT_SERVER_NAME if value hasn't been set yet.

      Parameters:
      serverName - Hostname or IP address of the server
    • getPortNumber

      int getPortNumber()
      Get the portnumber of the server.

      NOTE: Implementer should take care to return DEFAULT_PORT if value hasn't been set yet.

      Returns:
      Portnumber of the server
    • setPortNumber

      void setPortNumber(int portNumber)
      Set the port number of the server.

      NOTE: Implementer should take care to use the DEFAULT_PORT if this method hasn't been called yet.

      Parameters:
      portNumber - Port number of the server
    • getUser

      String getUser()
      Returns:
      Name of the user to authenticate to the server.
    • setUser

      void setUser(String user)
      Parameters:
      user - Name of the user to authenticate to the server.
    • getPassword

      String getPassword()
      Returns:
      Password to authenticate to the server.
    • setPassword

      void setPassword(String password)
      Parameters:
      password - Password to authenticate to the server.
    • getRoleName

      String getRoleName()
      Returns:
      SQL role to use.
    • setRoleName

      void setRoleName(String roleName)
      Parameters:
      roleName - SQL role to use.
    • getCharSet

      String getCharSet()
      Returns:
      Java character set for the connection.
    • setCharSet

      void setCharSet(String charSet)
      Set the Java character set for the connection.

      Contrary to other parts of the codebase, the value of encoding should not be changed when charSet is set.

      Parameters:
      charSet - Character set for the connection. Similar to encoding property, but accepts Java names instead of Firebird ones.
      See Also:
    • getEncoding

      String getEncoding()
      Returns:
      Firebird character encoding for the connection.
    • setEncoding

      void setEncoding(String encoding)
      Set the Firebird character set for the connection.

      Contrary to other parts of the codebase, the value of charSet should not be changed when encoding is set.

      Parameters:
      encoding - Firebird character encoding for the connection. See Firebird documentation for more information.
    • getSocketBufferSize

      int getSocketBufferSize()
      Get the socket buffer size.

      NOTE: Implementer should take care to return DEFAULT_SOCKET_BUFFER_SIZE if the value hasn't been set yet.

      Returns:
      socket buffer size in bytes, or -1 if not specified.
    • setSocketBufferSize

      void setSocketBufferSize(int socketBufferSize)
      Set the socket buffer size.

      NOTE: Implementer should take care to use DEFAULT_SOCKET_BUFFER_SIZE if the value hasn't been set yet.

      Parameters:
      socketBufferSize - socket buffer size in bytes.
    • getSoTimeout

      int getSoTimeout()
      Get the initial Socket blocking timeout (SoTimeout).

      NOTE: Implementer should take care to return DEFAULT_SO_TIMEOUT if the value hasn't been set yet.

      Returns:
      The initial socket blocking timeout in milliseconds (0 is 'infinite')
    • setSoTimeout

      void setSoTimeout(int soTimeout)
      Set the initial Socket blocking timeout (SoTimeout).

      NOTE: Implementer should take care to use DEFAULT_SO_TIMEOUT if the value hasn't been set yet.

      Parameters:
      soTimeout - Timeout in milliseconds (0 is 'infinite')
    • getConnectTimeout

      int getConnectTimeout()
      Get the connect timeout in seconds.

      NOTE: Implementer should take care to return DEFAULT_CONNECT_TIMEOUT if the value hasn't been set yet.

      Returns:
      Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)
    • setConnectTimeout

      void setConnectTimeout(int connectTimeout)
      Set the connect timeout in seconds.

      NOTE: Implementer should take care to use DEFAULT_CONNECT_TIMEOUT if the value hasn't been set yet.

      Parameters:
      connectTimeout - Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)
    • getWireCrypt

      WireCrypt getWireCrypt()
      Get the wire encryption level.

      NOTE: Implementer should take care to return WireCrypt.DEFAULT if the value hasn't been set yet.

      Returns:
      Wire encryption level
      Since:
      4.0
    • setWireCrypt

      void setWireCrypt(WireCrypt wireCrypt)
      Set the wire encryption level.

      NOTE: Implementer should take care to use WireCrypt.DEFAULT if the value hasn't been set yet.

      Parameters:
      wireCrypt - Wire encryption level (null not allowed)
      Since:
      4.0
    • getDbCryptConfig

      String getDbCryptConfig()
      Get the database encryption plugin configuration.
      Returns:
      Database encryption plugin configuration, meaning plugin specific
      Since:
      3.0.4
    • setDbCryptConfig

      void setDbCryptConfig(String dbCryptConfig)
      Sets the database encryption plugin configuration.
      Parameters:
      dbCryptConfig - Database encryption plugin configuration, meaning plugin specific
      Since:
      3.0.4
    • getAuthPlugins

      String getAuthPlugins()
      Get the list of authentication plugins to try.
      Returns:
      comma-separated list of authentication plugins, or null for driver default
      Since:
      4.0
    • setAuthPlugins

      void setAuthPlugins(String authPlugins)
      Sets the authentication plugins to try.

      Invalid names are skipped during authentication.

      Parameters:
      authPlugins - comma-separated list of authentication plugins, or null for driver default
      Since:
      4.0
    • isWireCompression

      boolean 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.conf read by the client library will be used.

      Returns:
      true wire compression enabled
      Since:
      4.0
    • setWireCompression

      void setWireCompression(boolean wireCompression)
      Sets if the connection should try to enable wire compression.
      Parameters:
      wireCompression - true enable wire compression, false disable wire compression (the default)
      Since:
      4.0
      See Also:
    • asImmutable

      T asImmutable()
      Returns:
      An immutable version of this instance as an implementation of IAttachProperties
    • asNewMutable

      T asNewMutable()
      Returns:
      A new, mutable, instance as an implementation of IAttachProperties with all properties copied.