Package org.firebirdsql.gds.ng.jna

## Class JnaConnection<T extends IAttachProperties<T>,​C extends JnaAttachment>

- java.lang.Object
- - org.firebirdsql.gds.ng.AbstractConnection<T,​C>
  - - org.firebirdsql.gds.ng.jna.JnaConnection<T,​C>

- Type Parameters:
    `T` - Type of attach properties
    `C` - Type of connection handle
  Direct Known Subclasses:
    `JnaDatabaseConnection`, `JnaServiceConnection`

      public abstract class JnaConnection<T extends IAttachProperties<T>,​C extends JnaAttachment>
      extends AbstractConnection<T,​C>

  Class handling the initial setup of the JNA connection.
  Since:
    3.0
  Author:
    Mark Rotteveel

- - ### Field Summary

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

      `attachProperties`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `JnaConnection​(FbClientLibrary clientLibrary, T attachProperties, IEncodingFactory encodingFactory)` | Creates a JnaConnection (without establishing a connection to the server).

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected abstract java.lang.String` | `createAttachUrl​(DbAttachInfo dbAttachInfo, T attachProperties)` |
    `java.lang.String` | `getAttachUrl()` | Gets the attach URL for the library.
    `FbClientLibrary` | `getClientLibrary()` |
    `protected void` | `processStatusVector​(ISC_STATUS[] statusVector, WarningMessageCallback warningMessageCallback)` |
    `protected static java.lang.String` | `toAttachUrl​(DbAttachInfo dbAttachInfo)` | Builds the attach URL for the library.

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

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

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

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

- - ### Constructor Detail

    - #### JnaConnection

          protected JnaConnection​(FbClientLibrary clientLibrary,
                                  T attachProperties,
                                  IEncodingFactory encodingFactory)
                           throws java.sql.SQLException

      Creates a JnaConnection (without establishing a connection to the server).
      Parameters:
        `clientLibrary` - Client library to use
        `attachProperties` - Attach properties
        `encodingFactory` - Encoding factory
      Throws:
        `java.sql.SQLException`

  - ### Method Detail

    - #### createAttachUrl

          protected abstract java.lang.String createAttachUrl​(DbAttachInfo dbAttachInfo,
                                                              T attachProperties)
                                                       throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getClientLibrary

          public final FbClientLibrary getClientLibrary()

      Returns:
        The client library instance associated with the connection.

    - #### processStatusVector

          protected void processStatusVector​(ISC_STATUS[] statusVector,
                                             WarningMessageCallback warningMessageCallback)
                                      throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getAttachUrl

          public java.lang.String getAttachUrl()

      Gets the attach URL for the library.
      Returns:
        Attach URL

    - #### toAttachUrl

          protected static java.lang.String toAttachUrl​(DbAttachInfo dbAttachInfo)

      Builds the attach URL for the library.
      Returns:
        Attach URL