Package org.firebirdsql.gds.ng.wire
Class AbstractFbWireBlob
- java.lang.Object
-
- org.firebirdsql.gds.ng.AbstractFbBlob
-
- org.firebirdsql.gds.ng.wire.AbstractFbWireBlob
-
- All Implemented Interfaces:
java.lang.AutoCloseable,FbBlob,DatabaseListener,ExceptionListenable,TransactionListener,FbWireBlob
- Direct Known Subclasses:
AbstractFbWireInputBlob,AbstractFbWireOutputBlob
public abstract class AbstractFbWireBlob extends AbstractFbBlob implements FbWireBlob
- Since:
- 3.0
- Author:
- Mark Rotteveel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.FbBlob
FbBlob.SeekMode
-
-
Field Summary
-
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbBlob
exceptionListenerDispatcher
-
Fields inherited from interface org.firebirdsql.gds.ng.FbBlob
NO_BLOB_ID
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractFbWireBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcancelImpl()Internal implementation ofAbstractFbBlob.cancel().protected voidcloseImpl()Internal implementation ofAbstractFbBlob.close().byte[]getBlobInfo(byte[] requestItems, int bufferLength)Request blob info.FbWireDatabasegetDatabase()intgetHandle()protected voidreleaseBlob(int releaseOperation)Release this blob with the specified operation.protected voidreleaseResources()Release Java resources held.protected voidsetHandle(int blobHandle)-
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbBlob
addExceptionListener, cancel, checkBlobClosed, checkBlobOpen, checkDatabaseAttached, checkTransactionActive, clearDatabase, clearTransaction, close, createBlobLengthProcessor, detached, detaching, getBlobInfo, getBlobParameterBuffer, getMaximumSegmentSize, getSynchronizationObject, getTransaction, isEndingTransaction, isEof, isOpen, length, removeExceptionListener, resetEof, setEof, setOpen, transactionStateChanged, warningReceived
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenable
addExceptionListener, removeExceptionListener
-
Methods inherited from interface org.firebirdsql.gds.ng.FbBlob
cancel, close, getBlobId, getBlobInfo, getMaximumSegmentSize, getSegment, getSynchronizationObject, isEof, isOpen, isOutput, length, open, putSegment, seek
-
-
-
-
Constructor Detail
-
AbstractFbWireBlob
protected AbstractFbWireBlob(FbWireDatabase database, FbWireTransaction transaction, BlobParameterBuffer blobParameterBuffer)
-
-
Method Detail
-
getDatabase
public FbWireDatabase getDatabase()
- Specified by:
getDatabasein interfaceFbBlob- Overrides:
getDatabasein classAbstractFbBlob- Returns:
- The database connection that created this blob
-
getHandle
public final int getHandle()
-
setHandle
protected final void setHandle(int blobHandle)
- Parameters:
blobHandle- The Firebird blob handle identifier
-
releaseBlob
protected void releaseBlob(int releaseOperation) throws java.sql.SQLExceptionRelease this blob with the specified operation.Implementations should only do the operation and not perform any further clean up or checks on attached database and active transaction, as those checks and clean up should be done by the caller.
- Parameters:
releaseOperation- EitherWireProtocolConstants.op_close_bloborWireProtocolConstants.op_cancel_blob- Throws:
java.sql.SQLException- For database communication errors.
-
closeImpl
protected void closeImpl() throws java.sql.SQLExceptionDescription copied from class:AbstractFbBlobInternal implementation ofAbstractFbBlob.close(). The implementation does not need to check for attached database and active transaction, nor does it need to mark this blob as closed.- Specified by:
closeImplin classAbstractFbBlob- Throws:
java.sql.SQLException
-
cancelImpl
protected void cancelImpl() throws java.sql.SQLExceptionDescription copied from class:AbstractFbBlobInternal implementation ofAbstractFbBlob.cancel(). The implementation does not need to check for attached database and active transaction, nor does it need to mark this blob as closed.- Specified by:
cancelImplin classAbstractFbBlob- Throws:
java.sql.SQLException
-
releaseResources
protected void releaseResources()
Description copied from class:AbstractFbBlobRelease Java resources held. This should not communicate with the Firebird server.- Specified by:
releaseResourcesin classAbstractFbBlob
-
getBlobInfo
public byte[] getBlobInfo(byte[] requestItems, int bufferLength) throws java.sql.SQLExceptionDescription copied from interface:FbBlobRequest blob info.- Specified by:
getBlobInfoin interfaceFbBlob- Parameters:
requestItems- Array of info items to requestbufferLength- Response buffer length to use- Returns:
- Response buffer
- Throws:
java.sql.SQLException
-
-