public abstract class AbstractWireOperations extends java.lang.Object implements FbWireOperations
FbWireOperations.ProcessAttachCallback| Modifier | Constructor and Description |
|---|---|
protected |
AbstractWireOperations(WireConnection<?,?> connection,
WarningMessageCallback defaultWarningMessageCallback,
java.lang.Object syncObject) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addServerKeys(byte[] serverKeys) |
protected void |
clearServerKeys() |
void |
consumePackets(int numberOfResponses,
WarningMessageCallback warningCallback)
Consumes packets notifying for warnings, but ignoring exceptions thrown from the packet.
|
protected IAttachProperties<?> |
getAttachProperties() |
protected ClientAuthBlock |
getClientAuthBlock() |
protected WireConnection<?,?> |
getConnection() |
protected WarningMessageCallback |
getDefaultWarningMessageCallback() |
protected Encoding |
getEncoding() |
protected java.util.List<EncryptionIdentifier> |
getEncryptionIdentifiers() |
protected java.lang.Object |
getSynchronizationObject() |
protected XdrInputStream |
getXdrIn()
Gets the XdrInputStream.
|
protected XdrOutputStream |
getXdrOut()
Gets the XdrOutputStream.
|
XdrStreamAccess |
getXdrStreamAccess() |
void |
handleCryptKeyCallback(DbCryptCallback dbCryptCallback)
Handles the database encryption key callback.
|
protected Response |
processOperation(int operation)
Reads the response based on the specified operation.
|
void |
processResponse(Response response) |
void |
processResponseWarnings(Response response,
WarningMessageCallback warningCallback)
Checks if the response included a warning and signals that warning to the
WarningMessageCallback.
|
GenericResponse |
readGenericResponse(WarningMessageCallback warningCallback)
Convenience method to read a Response to a GenericResponse
|
int |
readNextOperation()
Reads the next operation.
|
Response |
readOperationResponse(int operationCode,
WarningMessageCallback warningCallback)
Reads the response from the server when the operation code has already been read.
|
Response |
readResponse(WarningMessageCallback warningCallback)
Reads the response from the server.
|
Response |
readSingleResponse(WarningMessageCallback warningCallback)
Reads the response from the server.
|
SqlResponse |
readSqlResponse(WarningMessageCallback warningCallback)
Convenience method to read a Response to a SqlResponse
|
java.sql.SQLException |
readStatusVector()
Process the status vector and returns the associated
SQLException
instance. |
void |
setNetworkTimeout(int milliseconds)
Sets the network timeout for this attachment.
|
void |
writeDirect(byte[] data)
Writes directly to the
OutputStream of the underlying connection. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitauthReceiveResponse, enqueueDeferredAction, processDeferredActionsprotected AbstractWireOperations(WireConnection<?,?> connection, WarningMessageCallback defaultWarningMessageCallback, java.lang.Object syncObject)
public final XdrStreamAccess getXdrStreamAccess()
getXdrStreamAccess in interface FbWireOperationsXdrStreamAccess for this service.protected final Encoding getEncoding()
protected final XdrInputStream getXdrIn() throws java.sql.SQLException
java.sql.SQLException - If no connection is opened or when exceptions occur
retrieving the InputStreamprotected final XdrOutputStream getXdrOut() throws java.sql.SQLException
java.sql.SQLException - If no connection is opened or when exceptions occur
retrieving the OutputStreampublic final java.sql.SQLException readStatusVector()
throws java.sql.SQLException
FbWireOperationsSQLException
instance.
NOTE: This method returns the SQLException read from the status vector, and only throws SQLException when an error occurs processing the status ector.
readStatusVector in interface FbWireOperationsjava.sql.SQLException - for errors reading or processing the status vectorpublic final Response readResponse(WarningMessageCallback warningCallback) throws java.sql.SQLException, java.io.IOException
FbWireOperationsreadResponse in interface FbWireOperationswarningCallback - Callback object for warnings, null for default callbackResponse read.java.sql.SQLException - For errors returned from the server, or when attempting to readjava.io.IOException - For errors reading the response from the connection.public final Response readOperationResponse(int operationCode, WarningMessageCallback warningCallback) throws java.sql.SQLException, java.io.IOException
FbWireOperationsreadOperationResponse in interface FbWireOperationsoperationCode - The operation codewarningCallback - Callback object for warnings, null for default callbackResponse read.java.sql.SQLException - For errors returned from the server, or when attempting to readjava.io.IOException - For errors reading the response from the connection.FbWireOperations.readResponse(WarningMessageCallback)public final Response readSingleResponse(WarningMessageCallback warningCallback) throws java.sql.SQLException, java.io.IOException
FbWireOperationsreadSingleResponse in interface FbWireOperationswarningCallback - Callback object for signalling warnings, null to register warning on the default callbackjava.sql.SQLException - For errors returned from the server, or when attempting to
readjava.io.IOException - For errors reading the response from the connection.public final int readNextOperation()
throws java.io.IOException
WireConnection.readNextOperation().java.io.IOException - For errors reading the operation from the connectionprotected final Response processOperation(int operation) throws java.sql.SQLException, java.io.IOException
operation - Database operationjava.sql.SQLException - For errors reading the response from the connection.java.io.IOException - For errors reading the response from the connection.public final void processResponse(Response response) throws java.sql.SQLException
processResponse in interface FbWireOperationsresponse - Response to processjava.sql.SQLException - For errors returned from the server.public final void processResponseWarnings(Response response, WarningMessageCallback warningCallback)
processResponseWarnings in interface FbWireOperationsresponse - Response to processpublic final GenericResponse readGenericResponse(WarningMessageCallback warningCallback) throws java.sql.SQLException, java.io.IOException
FbWireOperationsreadGenericResponse in interface FbWireOperationswarningCallback - Callback object for warnings, null for default callbackjava.sql.SQLException - For errors returned from the server, or when attempting to
read.java.io.IOException - For errors reading the response from the connection.public final SqlResponse readSqlResponse(WarningMessageCallback warningCallback) throws java.sql.SQLException, java.io.IOException
FbWireOperationsreadSqlResponse in interface FbWireOperationswarningCallback - Callback object for warnings, null for default callbackjava.sql.SQLException - For errors returned from the server, or when attempting to
read.java.io.IOException - For errors reading the response from the connection.public void handleCryptKeyCallback(DbCryptCallback dbCryptCallback) throws java.io.IOException, java.sql.SQLException
FbWireOperationshandleCryptKeyCallback in interface FbWireOperationsdbCryptCallback - Database encryption callback pluginjava.io.IOException - For errors reading data from the socketjava.sql.SQLException - For database errorsjava.sql.SQLFeatureNotSupportedException - If this protocol version does not support crypt key callbackspublic final void consumePackets(int numberOfResponses,
WarningMessageCallback warningCallback)
FbWireOperationsThis 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).
consumePackets in interface FbWireOperationsnumberOfResponses - Number of responses to consume.warningCallback - Callback for warningspublic final void writeDirect(byte[] data)
throws java.io.IOException
FbWireOperationsOutputStream of the underlying connection.
Use of this method might lead to hard to find race conditions in the protocol. It is currently only used
to allow FbDatabase.cancelOperation(int) to work.
writeDirect in interface FbWireOperationsdata - Data to writejava.io.IOException - If there is no socket, the socket is closed, or for errors writing to the socket.WireConnection.writeDirect(byte[])public void setNetworkTimeout(int milliseconds)
throws java.sql.SQLException
FbWireOperationssetNetworkTimeout in interface FbWireOperationsmilliseconds - Timeout in milliseconds; 0 means no timeout. If the attachment doesn't support milliseconds, it should
round up to the nearest second.java.sql.SQLException - If this attachment is closed, the value of milliseconds is smaller than 0, or if setting the
timeout fails.java.sql.SQLFeatureNotSupportedException - If this attachment doesn't support changing the network timeout.protected final java.lang.Object getSynchronizationObject()
protected final void addServerKeys(byte[] serverKeys)
throws java.sql.SQLException
java.sql.SQLExceptionprotected final void clearServerKeys()
protected final ClientAuthBlock getClientAuthBlock()
protected final IAttachProperties<?> getAttachProperties()
protected final java.util.List<EncryptionIdentifier> getEncryptionIdentifiers()
protected final WireConnection<?,?> getConnection()
protected final WarningMessageCallback getDefaultWarningMessageCallback()
Copyright © 2001-2022 Jaybird (Firebird JDBC/JCA) team. All rights reserved.