public abstract class AbstractFbWireService extends AbstractFbService<WireServiceConnection> implements FbWireService
FbWireAttachment.AcceptPacket| Modifier and Type | Field and Description |
|---|---|
protected ProtocolDescriptor |
protocolDescriptor |
protected FbWireOperations |
wireOperations |
serviceListenerDispatcherconnection, exceptionListenerDispatcher| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFbWireService(WireServiceConnection connection,
ProtocolDescriptor descriptor)
Creates an AbstractFbWireDatabase instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAttached()
Checks if a physical connection to the server is established and if the
connection is attached to a database.
|
protected void |
checkConnected()
Checks if a physical connection to the server is established.
|
ServiceParameterBuffer |
createServiceParameterBuffer()
Creates an empty
ServiceParameterBuffer. |
ServiceRequestBuffer |
createServiceRequestBuffer() |
void |
forceClose()
Forces the connection to close without proper detach or cleanup.
|
protected XdrInputStream |
getXdrIn()
Gets the XdrInputStream.
|
protected XdrOutputStream |
getXdrOut()
Gets the XdrOutputStream.
|
XdrStreamAccess |
getXdrStreamAccess() |
boolean |
isAttached()
Current attachment status.
|
GenericResponse |
readGenericResponse(WarningMessageCallback warningCallback)
Convenience method to read a Response to a GenericResponse
|
void |
setNetworkTimeout(int milliseconds)
Sets the network timeout for this attachment.
|
addServiceListener, close, getDescribeServiceRequestBuffer, getServiceInfo, getServiceInformationProcessor, getServiceWarningCallback, internalDetach, removeServiceListeneraddExceptionListener, getDatatypeCoder, getEncoding, getEncodingFactory, getNetworkTimeout, getServerVersion, getServerVersionInformation, getSynchronizationObject, removeExceptionListener, safelyDetach, setAttached, setDetached, setServerVersionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddServiceListener, getHandle, getServiceInfo, getServiceInfo, removeServiceListener, startServiceActionauthReceiveResponseattach, close, getDatatypeCoder, getEncoding, getEncodingFactory, getNetworkTimeout, getServerVersion, getSynchronizationObjectaddExceptionListener, removeExceptionListenerprotected final ProtocolDescriptor protocolDescriptor
protected final FbWireOperations wireOperations
protected AbstractFbWireService(WireServiceConnection connection, ProtocolDescriptor descriptor)
connection - A WireConnection with an established connection to the server.descriptor - The ProtocolDescriptor that created this connection (this is
used for creating further dependent objects).public void forceClose()
throws java.sql.SQLException
AbstractFbAttachment
If a given implementation does not support this, then this method should call FbAttachment.close().
Default implementation, calls FbAttachment.close()
forceClose in interface FbAttachmentforceClose in class AbstractFbAttachment<WireServiceConnection>java.sql.SQLException - For problems closing the connection.public final ServiceParameterBuffer createServiceParameterBuffer()
FbServiceServiceParameterBuffer.
Attach expects a service parameter buffer to have the version as the first item. This needs to be added explicitly.
createServiceParameterBuffer in interface FbServicepublic final ServiceRequestBuffer createServiceRequestBuffer()
createServiceRequestBuffer in interface FbServicepublic final boolean isAttached()
FbAttachmentisAttached in interface FbAttachmentisAttached in class AbstractFbAttachment<WireServiceConnection>true if connected to the server and attached to a database or service, false
otherwise.protected final void checkConnected()
throws java.sql.SQLException
checkConnected in class AbstractFbAttachment<WireServiceConnection>java.sql.SQLException - If not connected.protected final void checkAttached()
throws java.sql.SQLException
This method calls checkConnected(), so it is not necessary to
call both.
java.sql.SQLException - If the database not connected or attached.public void setNetworkTimeout(int milliseconds)
throws java.sql.SQLException
FbAttachmentsetNetworkTimeout in interface FbAttachmentmilliseconds - 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 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 GenericResponse readGenericResponse(WarningMessageCallback warningCallback) throws java.sql.SQLException, java.io.IOException
FbWireAttachmentreadGenericResponse in interface FbWireAttachmentwarningCallback - 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 XdrStreamAccess getXdrStreamAccess()
getXdrStreamAccess in interface FbWireAttachmentXdrStreamAccess for this attachment.Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.