Package org.firebirdsql.gds.ng
Interface FbService
- 
- All Superinterfaces:
- java.lang.AutoCloseable,- ExceptionListenable,- FbAttachment
 - All Known Subinterfaces:
- FbWireService
 - All Known Implementing Classes:
- AbstractFbService,- AbstractFbWireService,- JnaService,- V10Service
 
 public interface FbService extends FbAttachment Connection handle to a service.All methods defined in this interface are required to notify all SQLExceptionthrown from the methods defined in this interface, and those exceptions notified by allExceptionListenableimplementations created from them.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddServiceListener(ServiceListener listener)Adds aServiceListenerinstance to this database.ServiceParameterBuffercreateServiceParameterBuffer()Creates an emptyServiceParameterBuffer.ServiceRequestBuffercreateServiceRequestBuffer()intgetHandle()byte[]getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int maxBufferLength)Performs a service info request (service query.<T> TgetServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int bufferLength, InfoProcessor<T> infoProcessor)Request service info (service query).voidremoveServiceListener(ServiceListener listener)Removes aServiceListenerinstance from this database.voidstartServiceAction(ServiceRequestBuffer serviceRequestBuffer)Starts a service action.- 
Methods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenableaddExceptionListener, removeExceptionListener
 - 
Methods inherited from interface org.firebirdsql.gds.ng.FbAttachmentattach, close, forceClose, getDatatypeCoder, getEncoding, getEncodingFactory, getNetworkTimeout, getServerVersion, getSynchronizationObject, isAttached, setNetworkTimeout
 
- 
 
- 
- 
- 
Method Detail- 
getHandleint getHandle() - Specified by:
- getHandlein interface- FbAttachment
- Returns:
- The service handle value
 
 - 
getServiceInfo<T> T getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int bufferLength, InfoProcessor<T> infoProcessor) throws java.sql.SQLException Request service info (service query).- Parameters:
- serviceParameterBuffer- Service parameters
- serviceRequestBuffer- Service request info
- bufferLength- Response buffer length to use
- infoProcessor- Implementation of- InfoProcessorto transform the info response
- Returns:
- Transformed info response of type T
- Throws:
- java.sql.SQLException- For errors retrieving or transforming the response.
 
 - 
getServiceInfobyte[] getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int maxBufferLength) throws java.sql.SQLException Performs a service info request (service query.- 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.
 
 - 
startServiceActionvoid startServiceAction(ServiceRequestBuffer serviceRequestBuffer) throws java.sql.SQLException Starts a service action.- Parameters:
- serviceRequestBuffer- Service action request details
- Throws:
- java.sql.SQLException- For errors starting the service action.
 
 - 
createServiceParameterBufferServiceParameterBuffer createServiceParameterBuffer() Creates an emptyServiceParameterBuffer.Attach expects a service parameter buffer to have the version as the first item. This needs to be added explicitly. - Returns:
- Service
 
 - 
createServiceRequestBufferServiceRequestBuffer createServiceRequestBuffer() - Returns:
- An empty service request buffer
 
 - 
addServiceListenervoid addServiceListener(ServiceListener listener) Adds aServiceListenerinstance to this database.- Parameters:
- listener- Database listener
 
 - 
removeServiceListenervoid removeServiceListener(ServiceListener listener) Removes aServiceListenerinstance from this database.- Parameters:
- listener- Database Listener
 
 
- 
 
-