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

# Interface FbWireAttachment

All Superinterfaces:
  `AutoCloseable`, `ExceptionListenable`, `FbAttachment`

All Known Subinterfaces:
  `FbWireDatabase`, `FbWireService`

All Known Implementing Classes:
  `AbstractFbWireDatabase`, `AbstractFbWireService`, `V10Database`, `V10Service`, `V11Database`, `V12Database`, `V13Database`, `V15Database`, `V16Database`, `V18Database`, `V19Database`

public interface FbWireAttachment extends FbAttachment

Since:
  3.0
Author:
  Mark Rotteveel

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static class`
  `FbWireAttachment.AcceptPacket`
  Struct-like class, reduced equivalent of Firebird p_acpd to store data for handling op_cond_accept.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `authReceiveResponse(FbWireAttachment.AcceptPacket acceptPacket)`
  Receive authentication response from the server.
  `FbWireOperations`
  `getWireOperations()`
  `XdrStreamAccess`
  `getXdrStreamAccess()`
  `GenericResponse`
  `readGenericResponse(WarningMessageCallback callback)`
  Convenience method to read a Response to a GenericResponse

  ### Methods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenable

  `addExceptionListener, removeExceptionListener`

  ### Methods inherited from interface org.firebirdsql.gds.ng.FbAttachment

  `attach, close, forceClose, getDatatypeCoder, getEncoding, getEncodingFactory, getHandle, getNetworkTimeout, getServerVersion, isAttached, isLockedByCurrentThread, setNetworkTimeout, withLock`

- ## Method Details

  - ### getXdrStreamAccess

    XdrStreamAccess getXdrStreamAccess()
    Returns:
      Instance of `XdrStreamAccess` for this attachment.

  - ### getWireOperations

    FbWireOperations getWireOperations()
    Returns:
      Instance of `FbWireOperations` for this attachment.

  - ### readGenericResponse

    GenericResponse readGenericResponse(WarningMessageCallback callback) throws SQLException, IOException
    Convenience method to read a Response to a GenericResponse
    Parameters:
      `callback` - Callback object for warnings, `null` for default callback
    Returns:
      GenericResponse
    Throws:
      `SQLException` - For errors returned from the server, or when attempting to read.
      `IOException` - For errors reading the response from the connection.

  - ### authReceiveResponse

    void authReceiveResponse(FbWireAttachment.AcceptPacket acceptPacket) throws IOException, SQLException
    Receive authentication response from the server.

    This method is only relevant for protocol V13 or higher.

    Parameters:
      `acceptPacket` - Packet with `op_cond_accept` data, or `null` when the data should be read from the connection.
    Throws:
      `IOException` - For errors reading the response from the connection.
      `SQLException` - For errors returned from the server, or when attempting to read.