Package org.firebirdsql.gds.ng.wire

## Class WireDatabaseConnection

- java.lang.Object
- - org.firebirdsql.gds.ng.AbstractConnection<T,​C>
  - - org.firebirdsql.gds.ng.wire.WireConnection<IConnectionProperties,​FbWireDatabase>
    - - org.firebirdsql.gds.ng.wire.WireDatabaseConnection

- All Implemented Interfaces:
    `java.io.Closeable`, `java.lang.AutoCloseable`

      public final class WireDatabaseConnection
      extends WireConnection<IConnectionProperties,​FbWireDatabase>

  Wire connection instance for connecting to a database
  Since:
    3.0
  Author:
    Mark Rotteveel

- - ### Field Summary

    - ### Fields inherited from class org.firebirdsql.gds.ng.AbstractConnection

      `attachProperties`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `WireDatabaseConnection​(IConnectionProperties connectionProperties)` | Creates a WireDatabaseConnection (without establishing a connection to the server) with the default protocol collection.
    `WireDatabaseConnection​(IConnectionProperties connectionProperties, IEncodingFactory encodingFactory, ProtocolCollection protocols)` | Creates a WireDatabaseConnection (without establishing a connection to the server).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected FbWireDatabase` | `createConnectionHandle​(ProtocolDescriptor protocolDescriptor)` | Creates the connection handle for this type of connection.
    `protected DbAttachInfo` | `toDbAttachInfo​(IConnectionProperties attachProperties)` |

    - ### Methods inherited from class org.firebirdsql.gds.ng.wire.WireConnection

      `clearAuthData, close, getAttachObjectName, getClientAuthBlock, getCnctFile, getPortNumber, getProtocolArchitecture, getProtocolMinimumType, getProtocolVersion, getServerName, getXdrStreamAccess, identify, isConnected, readNextOperation, resetSocketTimeout, setSoTimeout, socketConnect, writeDirect`

    - ### Methods inherited from class org.firebirdsql.gds.ng.AbstractConnection

      `createDbCryptCallback, getAttachProperties, getEncoding, getEncodingDefinition, getEncodingFactory, isLockedByCurrentThread, withLock`

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

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

- - ### Constructor Detail

    - #### WireDatabaseConnection

          public WireDatabaseConnection​(IConnectionProperties connectionProperties)
                                 throws java.sql.SQLException

      Creates a WireDatabaseConnection (without establishing a connection to the server) with the default protocol collection.
      Parameters:
        `connectionProperties` - Connection properties
      Throws:
        `java.sql.SQLException`

    - #### WireDatabaseConnection

          public WireDatabaseConnection​(IConnectionProperties connectionProperties,
                                        IEncodingFactory encodingFactory,
                                        ProtocolCollection protocols)
                                 throws java.sql.SQLException

      Creates a WireDatabaseConnection (without establishing a connection to the server).
      Parameters:
        `connectionProperties` - Connection properties
        `encodingFactory` - Factory for encoding definitions
        `protocols` - The collection of protocols to use for this connection.
      Throws:
        `java.sql.SQLException`

  - ### Method Detail

    - #### toDbAttachInfo

          protected DbAttachInfo toDbAttachInfo​(IConnectionProperties attachProperties)
                                         throws java.sql.SQLException

      Specified by:
        `toDbAttachInfo` in class `WireConnection<IConnectionProperties,​FbWireDatabase>`
      Throws:
        `java.sql.SQLException`

    - #### createConnectionHandle

          protected FbWireDatabase createConnectionHandle​(ProtocolDescriptor protocolDescriptor)

      Description copied from class: `WireConnection`
      Creates the connection handle for this type of connection.
      Specified by:
        `createConnectionHandle` in class `WireConnection<IConnectionProperties,​FbWireDatabase>`
      Parameters:
        `protocolDescriptor` - The protocol descriptor selected by the identify phase
      Returns:
        Connection handle