public abstract class AbstractFbService<T extends AbstractConnection<IServiceProperties,? extends FbService>> extends AbstractFbAttachment<T> implements FbService
| Modifier and Type | Field and Description |
|---|---|
protected ServiceListenerDispatcher |
serviceListenerDispatcher |
connection, exceptionListenerDispatcher| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFbService(T connection,
DatatypeCoder datatypeCoder) |
| Modifier and Type | Method and Description |
|---|---|
void |
addServiceListener(ServiceListener listener)
Adds a
ServiceListener instance to this database. |
void |
close()
Detaches and closes the connection.
|
protected ServiceRequestBuffer |
getDescribeServiceRequestBuffer() |
<R> R |
getServiceInfo(ServiceParameterBuffer serviceParameterBuffer,
ServiceRequestBuffer serviceRequestBuffer,
int bufferLength,
InfoProcessor<R> infoProcessor)
Request service info (service query).
|
protected InfoProcessor<FbService> |
getServiceInformationProcessor() |
protected WarningMessageCallback |
getServiceWarningCallback() |
protected abstract void |
internalDetach()
Actual implementation of service detach.
|
void |
removeServiceListener(ServiceListener listener)
Removes a
ServiceListener instance from this database. |
addExceptionListener, checkConnected, forceClose, getDatatypeCoder, getEncoding, getEncodingFactory, getNetworkTimeout, getServerVersion, getServerVersionInformation, isAttached, isLockedByCurrentThread, removeExceptionListener, safelyDetach, setAttached, setDetached, setServerVersion, withLockclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateServiceParameterBuffer, createServiceRequestBuffer, getHandle, getServiceInfo, startServiceActionattach, forceClose, getDatatypeCoder, getEncoding, getEncodingFactory, getNetworkTimeout, getServerVersion, isAttached, isLockedByCurrentThread, setNetworkTimeout, withLockaddExceptionListener, removeExceptionListenerprotected final ServiceListenerDispatcher serviceListenerDispatcher
protected AbstractFbService(T connection, DatatypeCoder datatypeCoder)
public final <R> R getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int bufferLength, InfoProcessor<R> infoProcessor) throws java.sql.SQLException
FbServicegetServiceInfo in interface FbServiceserviceParameterBuffer - Service parametersserviceRequestBuffer - Service request infobufferLength - Response buffer length to useinfoProcessor - Implementation of InfoProcessor to transform
the info responsejava.sql.SQLException - For errors retrieving or transforming the response.public final void addServiceListener(ServiceListener listener)
FbServiceServiceListener instance to this database.addServiceListener in interface FbServicelistener - Database listenerpublic final void removeServiceListener(ServiceListener listener)
FbServiceServiceListener instance from this database.removeServiceListener in interface FbServicelistener - Database Listenerprotected abstract void internalDetach()
throws java.sql.SQLException
Implementations of this method should only be called from close(), and should not
notify service listeners of the service ServiceListener.detaching(FbService) and
ServiceListener.detached(FbService) events.
java.sql.SQLExceptionpublic final void close()
throws java.sql.SQLException
Implementation note: Calls AbstractFbAttachment.checkConnected() and notifies service listeners of the detaching event, then
calls internalDetach() and finally notifies service listeners of database detach and removes all
listeners.
close in interface java.lang.AutoCloseableclose in interface FbAttachmentjava.sql.SQLException - If not currently connected, or another problem occurred detaching.protected final WarningMessageCallback getServiceWarningCallback()
protected ServiceRequestBuffer getDescribeServiceRequestBuffer()
protected InfoProcessor<FbService> getServiceInformationProcessor()
Copyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.