public class V10Service extends AbstractFbWireService implements FbWireService
FbWireService
implementation for the V10 wire protocolFbWireAttachment.AcceptPacket
protocolDescriptor, wireOperations
connection, exceptionListenerDispatcher
Constructor and Description |
---|
V10Service(WireServiceConnection connection,
ProtocolDescriptor descriptor) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterAttachActions() |
void |
attach()
Attach to the attachment type.
|
void |
authReceiveResponse(FbWireAttachment.AcceptPacket acceptPacket)
Receive authentication response from the server.
|
protected void |
closeConnection()
Closes the WireConnection associated with this connection.
|
protected void |
finalize() |
int |
getHandle() |
byte[] |
getServiceInfo(ServiceParameterBuffer serviceParameterBuffer,
ServiceRequestBuffer serviceRequestBuffer,
int maxBufferLength)
Performs a service info request (service query.
|
protected void |
internalDetach()
Actual implementation of service detach.
|
protected void |
processAttachResponse(GenericResponse genericResponse)
Processes the response from the server to the attach or create operation.
|
protected void |
sendAttachToBuffer(ServiceParameterBuffer spb)
Sends the buffer for op_service_attach
|
void |
startServiceAction(ServiceRequestBuffer serviceRequestBuffer)
Starts a service action.
|
checkAttached, checkConnected, createServiceParameterBuffer, createServiceRequestBuffer, getXdrIn, getXdrOut, getXdrStreamAccess, isAttached, readGenericResponse
addServiceListener, close, getDescribeServiceRequestBuffer, getServiceInfo, getServiceInformationProcessor, getServiceWarningCallback, removeServiceListener
addExceptionListener, createDbCryptCallback, getDatatypeCoder, getEncoding, getEncodingFactory, getServerVersion, getServerVersionInformation, getSynchronizationObject, removeExceptionListener, safelyDetach, setAttached, setDetached, setServerVersion
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addServiceListener, createServiceParameterBuffer, createServiceRequestBuffer, getServiceInfo, removeServiceListener
getXdrStreamAccess, readGenericResponse
close, getDatatypeCoder, getEncoding, getEncodingFactory, getServerVersion, getSynchronizationObject, isAttached
addExceptionListener, removeExceptionListener
public V10Service(WireServiceConnection connection, ProtocolDescriptor descriptor)
public int getHandle()
getHandle
in interface FbAttachment
getHandle
in interface FbService
public void attach() throws java.sql.SQLException
FbAttachment
attach
in interface FbAttachment
java.sql.SQLException
protected void processAttachResponse(GenericResponse genericResponse)
genericResponse
- GenericResponse received from the server.protected void afterAttachActions() throws java.sql.SQLException
java.sql.SQLException
protected void sendAttachToBuffer(ServiceParameterBuffer spb) throws java.sql.SQLException, java.io.IOException
spb
- Service parameter bufferjava.sql.SQLException
- If the connection is not openjava.io.IOException
- For errors writing to the connectionprotected void internalDetach() throws java.sql.SQLException
AbstractFbService
Implementations of this method should only be called from AbstractFbService.close()
, and should not
notify service listeners of the service ServiceListener.detaching(FbService)
and
ServiceListener.detached(FbService)
events.
internalDetach
in class AbstractFbService<WireServiceConnection>
java.sql.SQLException
public byte[] getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int maxBufferLength) throws java.sql.SQLException
FbService
getServiceInfo
in interface FbService
serviceParameterBuffer
- Service parameters (can be null)serviceRequestBuffer
- Service request infomaxBufferLength
- Maximum response buffer length to usemaxBufferLength
java.sql.SQLException
- For errors retrieving the information.public void startServiceAction(ServiceRequestBuffer serviceRequestBuffer) throws java.sql.SQLException
FbService
startServiceAction
in interface FbService
serviceRequestBuffer
- Service action request detailsjava.sql.SQLException
- For errors starting the service action.protected final void closeConnection() throws java.io.IOException
java.io.IOException
- For errors closing the connection.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public final void authReceiveResponse(FbWireAttachment.AcceptPacket acceptPacket) throws java.io.IOException, java.sql.SQLException
FbWireAttachment
This method is only relevant for protocol V13 or higher.
authReceiveResponse
in interface FbWireAttachment
acceptPacket
- Packet with op_cond_accept
data, or null
when the data should be read from the
connection.java.io.IOException
- For errors reading the response from the connection.java.sql.SQLException
- For errors returned from the server, or when attempting to
read.Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.