Interface FbWireDatabase

    • Method Detail

      • readResponse

        Response readResponse​(WarningMessageCallback callback)
                       throws java.sql.SQLException,
                              java.io.IOException
        Reads the response from the server.
        Parameters:
        callback - Callback object for warnings, null for default callback
        Returns:
        Response read.
        Throws:
        java.sql.SQLException - For errors returned from the server, or when attempting to read
        java.io.IOException - For errors reading the response from the connection.
      • releaseObject

        void releaseObject​(int operation,
                           int objectId)
                    throws java.sql.SQLException
        Release object.
        Parameters:
        operation - Operation
        objectId - ID of the object to release
        Throws:
        java.sql.SQLException
      • readSqlResponse

        SqlResponse readSqlResponse​(WarningMessageCallback callback)
                             throws java.sql.SQLException,
                                    java.io.IOException
        Convenience method to read a Response to a SqlResponse
        Parameters:
        callback - Callback object for warnings, null for default callback
        Returns:
        SqlResponse
        Throws:
        java.sql.SQLException - For errors returned from the server, or when attempting to read.
        java.io.IOException - For errors reading the response from the connection.
      • enqueueDeferredAction

        void enqueueDeferredAction​(DeferredAction deferredAction)
        Enqueue a deferred action.

        FbDatabase implementations that do not support deferred actions are allowed to throw an UnsupportedOperationException

        Parameters:
        deferredAction - Deferred action
      • consumePackets

        void consumePackets​(int numberOfResponses,
                            WarningMessageCallback warningCallback)
        Consumes packets notifying for warnings, but ignoring exceptions thrown from the packet.

        This method should only be used inside the implementation if either packets need to be ignored, or to ensure that there is no backlog of packets (eg when an exception occurs during processing of multiple package responses).

        Parameters:
        numberOfResponses - Number of responses to consume.
        warningCallback - Callback for warnings
      • getInfo

        byte[] getInfo​(int operation,
                       int handle,
                       byte[] requestItems,
                       int maxBufferLength,
                       WarningMessageCallback warningMessageCallback)
                throws java.sql.SQLException
        Generic info request.

        The implementation does not perform handle validation nor notification of error dispatchers. Doing that is the responsibility of the caller.

        Parameters:
        operation - Operation code
        handle - Handle (db, transaction, statement, blob, etc)
        requestItems - Information items to request
        maxBufferLength - Maximum response buffer length to use
        warningMessageCallback - Callback for warnings when reading the response (can be null to use database default)
        Returns:
        The response buffer (note: length is the actual length of the response, not maxBufferLength)
        Throws:
        java.sql.SQLException - For errors retrieving the information