java.lang.Object
org.firebirdsql.gds.ng.AbstractFbAttachment<T>
org.firebirdsql.gds.ng.AbstractFbService<WireServiceConnection>
org.firebirdsql.gds.ng.wire.AbstractFbWireService
org.firebirdsql.gds.ng.wire.version10.V10Service
- All Implemented Interfaces:
AutoCloseable
,FbAttachment
,FbService
,ExceptionListenable
,FbWireAttachment
,FbWireService
FbWireService
implementation for the V10 wire protocol- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.wire.FbWireAttachment
FbWireAttachment.AcceptPacket
-
Field Summary
Fields inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireService
protocolDescriptor, wireOperations
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbService
serviceListenerDispatcher
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbAttachment
connection, exceptionListenerDispatcher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
attach()
Attach to the attachment type.final void
authReceiveResponse
(FbWireAttachment.AcceptPacket acceptPacket) Receive authentication response from the server.byte[]
getServiceInfo
(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int maxBufferLength) Performs a service info request (service query.protected void
Actual implementation of service detach.protected void
processAttachResponse
(GenericResponse genericResponse) Processes the response from the server to the attach or create operation.protected void
Sends the buffer for op_service_attachvoid
startServiceAction
(ServiceRequestBuffer serviceRequestBuffer) Starts a service action.Methods inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireService
checkAttached, checkConnected, closeConnection, createServiceParameterBuffer, createServiceRequestBuffer, forceClose, getHandle, getWireOperations, getXdrIn, getXdrOut, getXdrStreamAccess, isAttached, readGenericResponse, setNetworkTimeout
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbService
addServiceListener, close, getDescribeServiceRequestBuffer, getServiceInfo, getServiceInformationProcessor, getServiceWarningCallback, removeServiceListener
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbAttachment
addExceptionListener, getDatatypeCoder, getEncoding, getEncodingFactory, getNetworkTimeout, getServerVersion, isLockedByCurrentThread, removeExceptionListener, requireNotAttached, safelyDetach, setAttached, setDetached, setServerVersion, withLock
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.FbAttachment
close, forceClose, getDatatypeCoder, getEncoding, getEncodingFactory, getNetworkTimeout, getServerVersion, isAttached, isLockedByCurrentThread, setNetworkTimeout, withLock
Methods inherited from interface org.firebirdsql.gds.ng.FbService
addServiceListener, createServiceParameterBuffer, createServiceRequestBuffer, getHandle, getServiceInfo, removeServiceListener
Methods inherited from interface org.firebirdsql.gds.ng.wire.FbWireAttachment
getWireOperations, getXdrStreamAccess, readGenericResponse
-
Constructor Details
-
V10Service
-
-
Method Details
-
attach
Description copied from interface:FbAttachment
Attach to the attachment type.- Specified by:
attach
in interfaceFbAttachment
- Throws:
SQLException
-
processAttachResponse
Processes the response from the server to the attach or create operation.- Parameters:
genericResponse
- GenericResponse received from the server.
-
afterAttachActions
- Throws:
SQLException
-
sendAttachToBuffer
Sends the buffer for op_service_attach- Parameters:
spb
- Service parameter buffer- Throws:
SQLException
- If the connection is not openIOException
- For errors writing to the connection
-
internalDetach
Description copied from class:AbstractFbService
Actual implementation of service detach.Implementations of this method should only be called from
AbstractFbService.close()
, and should not notify service listeners of the serviceServiceListener.detaching(FbService)
andServiceListener.detached(FbService)
events.- Specified by:
internalDetach
in classAbstractFbService<WireServiceConnection>
- Throws:
SQLException
-
getServiceInfo
public byte[] getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int maxBufferLength) throws SQLException Description copied from interface:FbService
Performs a service info request (service query.- Specified by:
getServiceInfo
in interfaceFbService
- Parameters:
serviceParameterBuffer
- Service parameters (can be null)serviceRequestBuffer
- Service request infomaxBufferLength
- Maximum response buffer length to use- Returns:
- The response buffer (note: length is the actual length of the response, not
maxBufferLength
- Throws:
SQLException
- For errors retrieving the information.
-
startServiceAction
Description copied from interface:FbService
Starts a service action.- Specified by:
startServiceAction
in interfaceFbService
- Parameters:
serviceRequestBuffer
- Service action request details- Throws:
SQLException
- For errors starting the service action.
-
authReceiveResponse
public final void authReceiveResponse(FbWireAttachment.AcceptPacket acceptPacket) throws IOException, SQLException Description copied from interface:FbWireAttachment
Receive authentication response from the server.This method is only relevant for protocol V13 or higher.
- Specified by:
authReceiveResponse
in interfaceFbWireAttachment
- Parameters:
acceptPacket
- Packet withop_cond_accept
data, ornull
when the data should be read from the connection.- Throws:
IOException
- For errors reading the response from the connection.SQLException
- For errors returned from the server, or when attempting to read.
-