Class V10Service
- 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:
- java.lang.AutoCloseable,- FbAttachment,- FbService,- ExceptionListenable,- FbWireAttachment,- FbWireService
 
 public class V10Service extends AbstractFbWireService implements FbWireService FbWireServiceimplementation 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.FbWireAttachmentFbWireAttachment.AcceptPacket
 
- 
 - 
Field Summary- 
Fields inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireServiceprotocolDescriptor, wireOperations
 - 
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbServiceserviceListenerDispatcher
 - 
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbAttachmentconnection, exceptionListenerDispatcher
 
- 
 - 
Constructor SummaryConstructors Constructor Description V10Service(WireServiceConnection connection, ProtocolDescriptor descriptor)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterAttachActions()voidattach()Attach to the attachment type.voidauthReceiveResponse(FbWireAttachment.AcceptPacket acceptPacket)Receive authentication response from the server.protected voidcloseConnection()Closes the WireConnection associated with this connection.protected voidfinalize()intgetHandle()byte[]getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int maxBufferLength)Performs a service info request (service query.protected voidinternalDetach()Actual implementation of service detach.protected voidprocessAttachResponse(GenericResponse genericResponse)Processes the response from the server to the attach or create operation.protected voidsendAttachToBuffer(ServiceParameterBuffer spb)Sends the buffer for op_service_attachvoidstartServiceAction(ServiceRequestBuffer serviceRequestBuffer)Starts a service action.- 
Methods inherited from class org.firebirdsql.gds.ng.wire.AbstractFbWireServicecheckAttached, checkConnected, createServiceParameterBuffer, createServiceRequestBuffer, forceClose, getXdrIn, getXdrOut, getXdrStreamAccess, isAttached, readGenericResponse, setNetworkTimeout
 - 
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbServiceaddServiceListener, close, getDescribeServiceRequestBuffer, getServiceInfo, getServiceInformationProcessor, getServiceWarningCallback, removeServiceListener
 - 
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbAttachmentaddExceptionListener, getDatatypeCoder, getEncoding, getEncodingFactory, getNetworkTimeout, getServerVersion, getServerVersionInformation, getSynchronizationObject, removeExceptionListener, safelyDetach, setAttached, setDetached, setServerVersion
 - 
Methods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenableaddExceptionListener, removeExceptionListener
 - 
Methods inherited from interface org.firebirdsql.gds.ng.FbAttachmentclose, forceClose, getDatatypeCoder, getEncoding, getEncodingFactory, getNetworkTimeout, getServerVersion, getSynchronizationObject, isAttached, setNetworkTimeout
 - 
Methods inherited from interface org.firebirdsql.gds.ng.FbServiceaddServiceListener, createServiceParameterBuffer, createServiceRequestBuffer, getServiceInfo, removeServiceListener
 - 
Methods inherited from interface org.firebirdsql.gds.ng.wire.FbWireAttachmentgetXdrStreamAccess, readGenericResponse
 
- 
 
- 
- 
- 
Constructor Detail- 
V10Servicepublic V10Service(WireServiceConnection connection, ProtocolDescriptor descriptor) 
 
- 
 - 
Method Detail- 
getHandlepublic int getHandle() - Specified by:
- getHandlein interface- FbAttachment
- Specified by:
- getHandlein interface- FbService
- Returns:
- The service handle value
 
 - 
attachpublic void attach() throws java.sql.SQLExceptionDescription copied from interface:FbAttachmentAttach to the attachment type.- Specified by:
- attachin interface- FbAttachment
- Throws:
- java.sql.SQLException
 
 - 
processAttachResponseprotected void processAttachResponse(GenericResponse genericResponse) Processes the response from the server to the attach or create operation.- Parameters:
- genericResponse- GenericResponse received from the server.
 
 - 
afterAttachActionsprotected void afterAttachActions() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
sendAttachToBufferprotected void sendAttachToBuffer(ServiceParameterBuffer spb) throws java.sql.SQLException, java.io.IOException Sends the buffer for op_service_attach- Parameters:
- spb- Service parameter buffer
- Throws:
- java.sql.SQLException- If the connection is not open
- java.io.IOException- For errors writing to the connection
 
 - 
internalDetachprotected void internalDetach() throws java.sql.SQLExceptionDescription copied from class:AbstractFbServiceActual 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:
- internalDetachin class- AbstractFbService<WireServiceConnection>
- Throws:
- java.sql.SQLException
 
 - 
getServiceInfopublic byte[] getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int maxBufferLength) throws java.sql.SQLException Description copied from interface:FbServicePerforms a service info request (service query.- Specified by:
- getServiceInfoin interface- FbService
- Parameters:
- serviceParameterBuffer- Service parameters (can be null)
- serviceRequestBuffer- Service request info
- maxBufferLength- Maximum response buffer length to use
- Returns:
- The response buffer (note: length is the actual length of the response, not maxBufferLength
- Throws:
- java.sql.SQLException- For errors retrieving the information.
 
 - 
startServiceActionpublic void startServiceAction(ServiceRequestBuffer serviceRequestBuffer) throws java.sql.SQLException Description copied from interface:FbServiceStarts a service action.- Specified by:
- startServiceActionin interface- FbService
- Parameters:
- serviceRequestBuffer- Service action request details
- Throws:
- java.sql.SQLException- For errors starting the service action.
 
 - 
closeConnectionprotected final void closeConnection() throws java.io.IOExceptionCloses the WireConnection associated with this connection.- Throws:
- java.io.IOException- For errors closing the connection.
 
 - 
finalizeprotected void finalize() throws java.lang.Throwable- Overrides:
- finalizein class- java.lang.Object
- Throws:
- java.lang.Throwable
 
 - 
authReceiveResponsepublic final void authReceiveResponse(FbWireAttachment.AcceptPacket acceptPacket) throws java.io.IOException, java.sql.SQLException Description copied from interface:FbWireAttachmentReceive authentication response from the server.This method is only relevant for protocol V13 or higher. - Specified by:
- authReceiveResponsein interface- FbWireAttachment
- Parameters:
- acceptPacket- Packet with- op_cond_acceptdata, or- nullwhen the data should be read from the connection.
- Throws:
- 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.
 
 
- 
 
-