org.firebirdsql.gds.ng

## Class AbstractImmutableAttachProperties<T extends IAttachProperties>

- java.lang.Object
- - org.firebirdsql.gds.ng.AbstractImmutableAttachProperties<T>

- All Implemented Interfaces:
    IAttachProperties<T>
  Direct Known Subclasses:
    FbImmutableConnectionProperties, FbImmutableServiceProperties

      public abstract class AbstractImmutableAttachProperties<T extends IAttachProperties>
      extends java.lang.Object
      implements IAttachProperties<T>

  Abstract immutable implementation of `IAttachProperties`.
  Since:
    3.0
  Author:
    Mark Rotteveel

- - ### Field Summary

    - ### Fields inherited from interface org.firebirdsql.gds.ng.IAttachProperties

      `DEFAULT_CONNECT_TIMEOUT, DEFAULT_PORT, DEFAULT_SERVER_NAME, DEFAULT_SO_TIMEOUT, DEFAULT_SOCKET_BUFFER_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractImmutableAttachProperties(IAttachProperties src)` Copy constructor for IAttachProperties.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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
    `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` | `setWireCrypt(WireCrypt wireCrypt)` Set the wire encryption level.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.firebirdsql.gds.ng.IAttachProperties

      `asImmutable, asNewMutable, getAttachObjectName`

- - ### Constructor Detail

    - #### AbstractImmutableAttachProperties

          public AbstractImmutableAttachProperties(IAttachProperties src)

      Copy constructor for IAttachProperties.

      All properties defined in `IAttachProperties` are copied from `src` to the new instance.

      Parameters:
        `src` - Source to copy from

  - ### Method Detail

    - #### getServerName

          public java.lang.String getServerName()

      Description copied from interface: `IAttachProperties`
      Get the hostname or IP address of the Firebird server.

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

      Specified by:
        `getServerName` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        Hostname or IP address of the server

    - #### setServerName

          public void setServerName(java.lang.String serverName)

      Description copied from interface: `IAttachProperties`
      Set the hostname or IP address of the Firebird server.

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

      Specified by:
        `setServerName` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `serverName` - Hostname or IP address of the server

    - #### getPortNumber

          public int getPortNumber()

      Description copied from interface: `IAttachProperties`
      Get the portnumber of the server.

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

      Specified by:
        `getPortNumber` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        Portnumber of the server

    - #### setPortNumber

          public void setPortNumber(int portNumber)

      Description copied from interface: `IAttachProperties`
      Set the port number of the server.

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

      Specified by:
        `setPortNumber` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `portNumber` - Port number of the server

    - #### getUser

          public java.lang.String getUser()

      Specified by:
        `getUser` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        Name of the user to authenticate to the server.

    - #### setUser

          public void setUser(java.lang.String user)

      Specified by:
        `setUser` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `user` - Name of the user to authenticate to the server.

    - #### getPassword

          public java.lang.String getPassword()

      Specified by:
        `getPassword` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        Password to authenticate to the server.

    - #### setPassword

          public void setPassword(java.lang.String password)

      Specified by:
        `setPassword` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `password` - Password to authenticate to the server.

    - #### getRoleName

          public java.lang.String getRoleName()

      Specified by:
        `getRoleName` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        SQL role to use.

    - #### setRoleName

          public void setRoleName(java.lang.String roleName)

      Specified by:
        `setRoleName` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `roleName` - SQL role to use.

    - #### getCharSet

          public java.lang.String getCharSet()

      Specified by:
        `getCharSet` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        Java character set for the connection.

    - #### setCharSet

          public void setCharSet(java.lang.String charSet)

      Description copied from interface: `IAttachProperties`
      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.

      Specified by:
        `setCharSet` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `charSet` - Character set for the connection. Similar to `encoding` property, but accepts Java names instead of Firebird ones.
      See Also:
        `IAttachProperties.setEncoding(String)`

    - #### getEncoding

          public java.lang.String getEncoding()

      Specified by:
        `getEncoding` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        Firebird character encoding for the connection.

    - #### setEncoding

          public void setEncoding(java.lang.String encoding)

      Description copied from interface: `IAttachProperties`
      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.

      Specified by:
        `setEncoding` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `encoding` - Firebird character encoding for the connection. See Firebird documentation for more information.

    - #### getSocketBufferSize

          public int getSocketBufferSize()

      Description copied from interface: `IAttachProperties`
      Get the socket buffer size.

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

      Specified by:
        `getSocketBufferSize` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        socket buffer size in bytes, or -1 if not specified.

    - #### setSocketBufferSize

          public void setSocketBufferSize(int socketBufferSize)

      Description copied from interface: `IAttachProperties`
      Set the socket buffer size.

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

      Specified by:
        `setSocketBufferSize` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `socketBufferSize` - socket buffer size in bytes.

    - #### getSoTimeout

          public int getSoTimeout()

      Description copied from interface: `IAttachProperties`
      Get the initial Socket blocking timeout (SoTimeout).

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

      Specified by:
        `getSoTimeout` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        The initial socket blocking timeout in milliseconds (0 is 'infinite')

    - #### setSoTimeout

          public void setSoTimeout(int soTimeout)

      Description copied from interface: `IAttachProperties`
      Set the initial Socket blocking timeout (SoTimeout).

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

      Specified by:
        `setSoTimeout` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `soTimeout` - Timeout in milliseconds (0 is 'infinite')

    - #### getConnectTimeout

          public int getConnectTimeout()

      Description copied from interface: `IAttachProperties`
      Get the connect timeout in seconds.

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

      Specified by:
        `getConnectTimeout` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)

    - #### setConnectTimeout

          public void setConnectTimeout(int connectTimeout)

      Description copied from interface: `IAttachProperties`
      Set the connect timeout in seconds.

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

      Specified by:
        `setConnectTimeout` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `connectTimeout` - Connect timeout in seconds (0 is 'infinite', or better: OS specific timeout)

    - #### getWireCrypt

          public WireCrypt getWireCrypt()

      Description copied from interface: `IAttachProperties`
      Get the wire encryption level.

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

      Specified by:
        `getWireCrypt` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        Wire encryption level

    - #### setWireCrypt

          public void setWireCrypt(WireCrypt wireCrypt)

      Description copied from interface: `IAttachProperties`
      Set the wire encryption level.

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

      Specified by:
        `setWireCrypt` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `wireCrypt` - Wire encryption level (`null` not allowed)

    - #### getDbCryptConfig

          public java.lang.String getDbCryptConfig()

      Description copied from interface: `IAttachProperties`
      Get the database encryption plugin configuration.
      Specified by:
        `getDbCryptConfig` in interface `IAttachProperties<T extends IAttachProperties>`
      Returns:
        Database encryption plugin configuration, meaning plugin specific

    - #### setDbCryptConfig

          public void setDbCryptConfig(java.lang.String dbCryptConfig)

      Description copied from interface: `IAttachProperties`
      Sets the database encryption plugin configuration.
      Specified by:
        `setDbCryptConfig` in interface `IAttachProperties<T extends IAttachProperties>`
      Parameters:
        `dbCryptConfig` - Database encryption plugin configuration, meaning plugin specific

    - #### immutable

          protected final void immutable()

      Throws an UnsupportedOperationException

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.