public abstract class AbstractFbService<T extends AbstractConnection<IServiceProperties,? extends FbService>> extends AbstractFbAttachment<T> implements FbService
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, createDbCryptCallback, getDatatypeCoder, getEncoding, getEncodingFactory, getServerVersion, getServerVersionInformation, getSynchronizationObject, isAttached, removeExceptionListener, safelyDetach, setAttached, setDetached, setServerVersion
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createServiceParameterBuffer, createServiceRequestBuffer, getHandle, getServiceInfo, startServiceAction
attach, getDatatypeCoder, getEncoding, getEncodingFactory, getServerVersion, getSynchronizationObject, isAttached
addExceptionListener, removeExceptionListener
protected AbstractFbService(T connection, DatatypeCoder datatypeCoder)
public final <R> R getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int bufferLength, InfoProcessor<R> infoProcessor) throws java.sql.SQLException
FbService
getServiceInfo
in interface FbService
serviceParameterBuffer
- 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)
FbService
ServiceListener
instance to this database.addServiceListener
in interface FbService
listener
- Database listenerpublic final void removeServiceListener(ServiceListener listener)
FbService
ServiceListener
instance from this database.removeServiceListener
in interface FbService
listener
- 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.SQLException
public 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.AutoCloseable
close
in interface FbAttachment
java.sql.SQLException
- If not currently connected, or another problem occurred detaching.protected final WarningMessageCallback getServiceWarningCallback()
protected ServiceRequestBuffer getDescribeServiceRequestBuffer()
protected InfoProcessor<FbService> getServiceInformationProcessor()
Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.