Class AbstractConnection<T extends IAttachProperties<T>,C extends FbAttachment>

java.lang.Object
org.firebirdsql.gds.ng.AbstractConnection<T,C>
Type Parameters:
T - Type of attach properties
C - Type of connection handle
Direct Known Subclasses:
JnaConnection, WireConnection

public abstract class AbstractConnection<T extends IAttachProperties<T>,C extends FbAttachment> extends Object
Abstract class with common logic for connections.
Since:
3.0
Author:
Mark Rotteveel
  • Field Details

  • Constructor Details

  • Method Details

    • identify

      public abstract C identify() throws SQLException
      Performs the connection identification phase of the protocol and returns the connection handle implementation for the agreed protocol.
      Returns:
      Connection handle (ie FbDatabase or FbService)
      Throws:
      SQLException - For exceptions connecting
    • getServerName

      public final String getServerName()
    • getPortNumber

      public final int getPortNumber()
    • getAttachObjectName

      public final String getAttachObjectName()
    • getAttachProperties

      public final T getAttachProperties()
      Returns:
      An immutable copy of the current attach properties.
    • getEncodingDefinition

      public final EncodingDefinition getEncodingDefinition()
    • getEncoding

      public final Encoding getEncoding()
    • getEncodingFactory

      public final IEncodingFactory getEncodingFactory()
    • createDbCryptCallback

      @InternalApi public final DbCryptCallback createDbCryptCallback() throws SQLException
      Creates an instance of DbCryptCallback for this connection.
      Returns:
      Database encryption callback.
      Throws:
      SQLException - For errors initializing the callback