Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng.wire.version10

# Class Version10Descriptor

java.lang.Object
org.firebirdsql.gds.ng.wire.AbstractProtocolDescriptor
org.firebirdsql.gds.ng.wire.version10.Version10Descriptor

All Implemented Interfaces:
  `ProtocolDescriptor`

public final class Version10Descriptor extends AbstractProtocolDescriptor implements ProtocolDescriptor
The `ProtocolDescriptor` for the Firebird version 10 protocol. This version applies to Firebird 1.x and 2.0, but also works with newer Firebird versions.

Since:
  3.0
Author:
  Mark Rotteveel

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Version10Descriptor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FbWireAsynchronousChannel`
  `createAsynchronousChannel(FbWireDatabase database)`
  Create a disconnected asynchronous channel.
  `FbWireDatabase`
  `createDatabase(WireDatabaseConnection connection)`
  Create `FbWireDatabase` implementation for this protocol.
  `FbWireBlob`
  `createInputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer, long blobId)`
  Create an input `FbWireBlob` implementation for this protocol version.
  `FbWireBlob`
  `createOutputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer)`
  Create an output `FbWireBlob` implementation for this protocol version.
  `FbWireService`
  `createService(WireServiceConnection connection)`
  Create `FbWireService` implementation for this protocol.
  `ServiceParameterBuffer`
  `createServiceParameterBuffer(WireServiceConnection connection)`
  Creates a normal `ServiceParameterBuffer`.
  `ServiceRequestBuffer`
  `createServiceRequestBuffer(WireServiceConnection connection)`
  `FbWireStatement`
  `createStatement(FbWireDatabase database)`
  Create `FbStatement` implementation for this protocol.
  `FbWireTransaction`
  `createTransaction(FbWireDatabase database, int transactionHandle, TransactionState initialState)`
  Create `FbTransaction` implementation for this protocol.
  `FbWireOperations`
  `createWireOperations(WireConnection<?,?> connection, WarningMessageCallback defaultWarningMessageCallback)`
  Create an `FbWireOperations` implementation for this protocol version.
  `protected ParameterConverter<WireDatabaseConnection,WireServiceConnection>`
  `getParameterConverter()`

  ### Methods inherited from class org.firebirdsql.gds.ng.wire.AbstractProtocolDescriptor

  `createAttachServiceParameterBuffer, createBlrCalculator, createDatabaseParameterBuffer, equals, getArchitecture, getMaximumType, getMinimumType, getVersion, getWeight, hashCode, supportsWireCompression`

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

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

  ### Methods inherited from interface org.firebirdsql.gds.ng.wire.ProtocolDescriptor

  `createAttachServiceParameterBuffer, createBlrCalculator, createDatabaseParameterBuffer, getArchitecture, getMaximumType, getMinimumType, getVersion, getWeight, supportsWireCompression`

- ## Constructor Details

  - ### Version10Descriptor

    public Version10Descriptor()

- ## Method Details

  - ### createDatabase

    public FbWireDatabase createDatabase(WireDatabaseConnection connection)
    Description copied from interface: `ProtocolDescriptor`
    Create `FbWireDatabase` implementation for this protocol.
    Specified by:
      `createDatabase` in interface `ProtocolDescriptor`
    Parameters:
      `connection` - WireDatabaseConnection to this database
    Returns:
      FbWireDatabase implementation

  - ### createService

    public FbWireService createService(WireServiceConnection connection)
    Description copied from interface: `ProtocolDescriptor`
    Create `FbWireService` implementation for this protocol.
    Specified by:
      `createService` in interface `ProtocolDescriptor`
    Parameters:
      `connection` - WireServiceConnection to this service
    Returns:
      FbWireService implementation

  - ### createServiceParameterBuffer

    public ServiceParameterBuffer createServiceParameterBuffer(WireServiceConnection connection)
    Description copied from interface: `ProtocolDescriptor`
    Creates a normal `ServiceParameterBuffer`.
    Specified by:
      `createServiceParameterBuffer` in interface `ProtocolDescriptor`
    Parameters:
      `connection` - Connection
    Returns:
      ServiceParameterBuffer implementation

  - ### createServiceRequestBuffer

    public ServiceRequestBuffer createServiceRequestBuffer(WireServiceConnection connection)
    Specified by:
      `createServiceRequestBuffer` in interface `ProtocolDescriptor`
    Returns:
      An empty service request buffer

  - ### createTransaction

    public FbWireTransaction createTransaction(FbWireDatabase database, int transactionHandle, TransactionState initialState)
    Description copied from interface: `ProtocolDescriptor`
    Create `FbTransaction` implementation for this protocol.
    Specified by:
      `createTransaction` in interface `ProtocolDescriptor`
    Parameters:
      `database` - FbWireDatabase of the current database
      `transactionHandle` - Transaction handle
      `initialState` - Initial transaction state (either `TransactionState.ACTIVE` or `TransactionState.PREPARED`).
    Returns:
      FbTransaction implementation

  - ### createStatement

    public FbWireStatement createStatement(FbWireDatabase database)
    Description copied from interface: `ProtocolDescriptor`
    Create `FbStatement` implementation for this protocol.
    Specified by:
      `createStatement` in interface `ProtocolDescriptor`
    Parameters:
      `database` - FbWireDatabase of the current database
    Returns:
      FbStatement implementation

  - ### createOutputBlob

    public FbWireBlob createOutputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer) throws SQLException
    Description copied from interface: `ProtocolDescriptor`
    Create an output `FbWireBlob` implementation for this protocol version.
    Specified by:
      `createOutputBlob` in interface `ProtocolDescriptor`
    Parameters:
      `database` - FbWireDatabase of the current database
      `transaction` - FbWireTransaction to associate with the blob
      `blobParameterBuffer` - Blob Parameter Buffer
    Returns:
      FbWireBlob implementation
    Throws:
      `SQLException` - if the database is not attached or the transaction is not active

  - ### createInputBlob

    public FbWireBlob createInputBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer, long blobId) throws SQLException
    Description copied from interface: `ProtocolDescriptor`
    Create an input `FbWireBlob` implementation for this protocol version.
    Specified by:
      `createInputBlob` in interface `ProtocolDescriptor`
    Parameters:
      `database` - FbWireDatabase of the current database
      `transaction` - FbWireTransaction to associate with the blob
      `blobParameterBuffer` - Blob Parameter Buffer
      `blobId` - Blob Id (must be non-zero for input blob)
    Returns:
      FbWireBlob implementation
    Throws:
      `SQLException` - if the database is not attached or the transaction is not active

  - ### createAsynchronousChannel

    public FbWireAsynchronousChannel createAsynchronousChannel(FbWireDatabase database)
    Description copied from interface: `ProtocolDescriptor`
    Create a disconnected asynchronous channel.
    Specified by:
      `createAsynchronousChannel` in interface `ProtocolDescriptor`
    Parameters:
      `database` - The parent database handle.
    Returns:
      Asynchronous channel implementation

  - ### createWireOperations

    public FbWireOperations createWireOperations(WireConnection<?,?> connection, WarningMessageCallback defaultWarningMessageCallback)
    Description copied from interface: `ProtocolDescriptor`
    Create an `FbWireOperations` implementation for this protocol version.
    Specified by:
      `createWireOperations` in interface `ProtocolDescriptor`
    Parameters:
      `connection` - WireConnection instance (non-`null`)
      `defaultWarningMessageCallback` - default warning message callback (non-`null`)
    Returns:
      Wire operations implementation

  - ### getParameterConverter

    protected ParameterConverter<WireDatabaseConnection,WireServiceConnection> getParameterConverter()
    Specified by:
      `getParameterConverter` in class `AbstractProtocolDescriptor`
    Returns:
      `ParameterConverter` for populating the database parameter buffer.