- All Superinterfaces:
AutoCloseable
,ExceptionListenable
,FbAttachment
,FbDatabase
,FbWireAttachment
- All Known Implementing Classes:
AbstractFbWireDatabase
,V10Database
,V11Database
,V12Database
,V13Database
,V15Database
,V16Database
,V18Database
- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.wire.FbWireAttachment
FbWireAttachment.AcceptPacket
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Completes pending deferred actions.void
consumePackets
(int numberOfResponses, WarningMessageCallback warningCallback) Consumes packets notifying for warnings, but ignoring exceptions thrown from the packet.void
enqueueDeferredAction
(DeferredAction deferredAction) Enqueue a deferred action.byte[]
getInfo
(int operation, int handle, byte[] requestItems, int maxBufferLength, WarningMessageCallback warningMessageCallback) Generic info request.readResponse
(WarningMessageCallback callback) Reads the response from the server.readSqlResponse
(WarningMessageCallback callback) Convenience method to read a Response to a SqlResponsevoid
releaseObject
(int operation, int objectId) Release object.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, getNetworkTimeout, getServerVersion, isAttached, isLockedByCurrentThread, setNetworkTimeout, withLock
Methods inherited from interface org.firebirdsql.gds.ng.FbDatabase
addDatabaseListener, addWeakDatabaseListener, cancelEvent, cancelOperation, countEvents, createBlobForInput, createBlobForInput, createBlobForInput, createBlobForOutput, createBlobForOutput, createBlobForOutput, createBlobParameterBuffer, createDatabase, createEventHandle, createStatement, createTransactionParameterBuffer, dropDatabase, emptyRowDescriptor, executeImmediate, getConnectionDialect, getConnectionProperties, getDatabaseDialect, getDatabaseInfo, getDatabaseInfo, getHandle, getOdsMajor, getOdsMinor, getOdsVersion, queueEvent, reconnectTransaction, removeDatabaseListener, startTransaction, startTransaction
Methods inherited from interface org.firebirdsql.gds.ng.wire.FbWireAttachment
authReceiveResponse, getWireOperations, getXdrStreamAccess, readGenericResponse
-
Method Details
-
readResponse
Reads the response from the server.- Parameters:
callback
- Callback object for warnings,null
for default callback- Returns:
Response
read.- Throws:
SQLException
- For errors returned from the server, or when attempting to readIOException
- For errors reading the response from the connection.
-
releaseObject
Release object.- Parameters:
operation
- OperationobjectId
- ID of the object to release- Throws:
SQLException
-
readSqlResponse
Convenience method to read a Response to a SqlResponse- Parameters:
callback
- Callback object for warnings,null
for default callback- Returns:
- SqlResponse
- Throws:
SQLException
- For errors returned from the server, or when attempting to read.IOException
- For errors reading the response from the connection.
-
getBlrCalculator
BlrCalculator getBlrCalculator()- Returns:
- The
BlrCalculator
instance for this database.
-
enqueueDeferredAction
Enqueue a deferred action.FbDatabase implementations that do not support deferred actions are allowed to throw an
UnsupportedOperationException
- Parameters:
deferredAction
- Deferred action- Throws:
SQLException
- for errors forcing handling of oversized queue usingop_ping
(orop_batch_sync
)
-
completeDeferredActions
Completes pending deferred actions.FbDatabase implementations that do not support deferred actions should simply do nothing.
- Throws:
SQLException
- for errors forcing ping/batch sync- Since:
- 6
-
consumePackets
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 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 codehandle
- Handle (db, transaction, statement, blob, etc)requestItems
- Information items to requestmaxBufferLength
- Maximum response buffer length to usewarningMessageCallback
- Callback for warnings when reading the response (can benull
to use database default)- Returns:
- The response buffer (note: length is the actual length of the response, not
maxBufferLength
) - Throws:
SQLException
- For errors retrieving the information
-