public final class JnaService extends AbstractFbService<JnaServiceConnection> implements JnaAttachment
FbService for native client access.| Modifier and Type | Field and Description |
|---|---|
static int |
STATUS_VECTOR_SIZE |
connection, exceptionListenerDispatcher| Constructor and Description |
|---|
JnaService(JnaServiceConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterAttachActions()
Additional tasks to execute directly after attach operation.
|
void |
attach()
Attach to the attachment type.
|
protected void |
checkConnected()
Checks if the attachment is connected, and throws a
SQLException if it isn't connected. |
ServiceParameterBuffer |
createServiceParameterBuffer()
Creates an empty
ServiceParameterBuffer. |
ServiceRequestBuffer |
createServiceRequestBuffer() |
protected void |
finalize() |
int |
getHandle() |
com.sun.jna.ptr.IntByReference |
getJnaHandle() |
byte[] |
getServiceInfo(ServiceParameterBuffer serviceParameterBuffer,
ServiceRequestBuffer serviceRequestBuffer,
int maxBufferLength)
Performs a service info request (service query.
|
protected void |
internalDetach()
Actual implementation of service detach.
|
void |
processStatusVector(ISC_STATUS[] statusVector,
WarningMessageCallback warningMessageCallback) |
void |
startServiceAction(ServiceRequestBuffer serviceRequestBuffer)
Starts a service action.
|
addServiceListener, close, getDescribeServiceRequestBuffer, getServiceInfo, getServiceInformationProcessor, getServiceWarningCallback, removeServiceListeneraddExceptionListener, createDbCryptCallback, getDatatypeCoder, getEncoding, getEncodingFactory, getServerVersion, getServerVersionInformation, getSynchronizationObject, isAttached, removeExceptionListener, safelyDetach, setAttached, setDetached, setServerVersionclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getDatatypeCoder, getEncoding, getEncodingFactory, getServerVersion, getSynchronizationObject, isAttachedaddExceptionListener, removeExceptionListenerpublic static final int STATUS_VECTOR_SIZE
public JnaService(JnaServiceConnection connection)
public ServiceParameterBuffer createServiceParameterBuffer()
FbServiceServiceParameterBuffer.
Attach expects a service parameter buffer to have the version as the first item. This needs to be added explicitly.
createServiceParameterBuffer in interface FbServicepublic ServiceRequestBuffer createServiceRequestBuffer()
createServiceRequestBuffer in interface FbServiceprotected void checkConnected()
throws java.sql.SQLException
AbstractFbAttachmentSQLException if it isn't connected.checkConnected in class AbstractFbAttachment<JnaServiceConnection>java.sql.SQLExceptionpublic byte[] getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int maxBufferLength) throws java.sql.SQLException
FbServicegetServiceInfo in interface FbServiceserviceParameterBuffer - Service parameters (can be null)serviceRequestBuffer - Service request infomaxBufferLength - Maximum response buffer length to usemaxBufferLengthjava.sql.SQLException - For errors retrieving the information.public void startServiceAction(ServiceRequestBuffer serviceRequestBuffer) throws java.sql.SQLException
FbServicestartServiceAction in interface FbServiceserviceRequestBuffer - Service action request detailsjava.sql.SQLException - For errors starting the service action.public void attach()
throws java.sql.SQLException
FbAttachmentattach in interface FbAttachmentjava.sql.SQLExceptionprotected void afterAttachActions()
throws java.sql.SQLException
Implementation retrieves service information like server version.
java.sql.SQLException - For errors reading or writing database information.protected void internalDetach()
throws java.sql.SQLException
AbstractFbService
Implementations of this method should only be called from AbstractFbService.close(), and should not
notify service listeners of the service ServiceListener.detaching(FbService) and
ServiceListener.detached(FbService) events.
internalDetach in class AbstractFbService<JnaServiceConnection>java.sql.SQLExceptionpublic int getHandle()
getHandle in interface FbAttachmentgetHandle in interface FbServicepublic com.sun.jna.ptr.IntByReference getJnaHandle()
public void processStatusVector(ISC_STATUS[] statusVector, WarningMessageCallback warningMessageCallback) throws java.sql.SQLException
java.sql.SQLExceptionprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.ThrowableCopyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.