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, removeServiceListener
addExceptionListener, createDbCryptCallback, getDatatypeCoder, getEncoding, getEncodingFactory, getServerVersion, getServerVersionInformation, getSynchronizationObject, isAttached, removeExceptionListener, safelyDetach, setAttached, setDetached, setServerVersion
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getDatatypeCoder, getEncoding, getEncodingFactory, getServerVersion, getSynchronizationObject, isAttached
addExceptionListener, removeExceptionListener
public static final int STATUS_VECTOR_SIZE
public JnaService(JnaServiceConnection connection)
public ServiceParameterBuffer createServiceParameterBuffer()
FbService
ServiceParameterBuffer
.
Attach expects a service parameter buffer to have the version as the first item. This needs to be added explicitly.
createServiceParameterBuffer
in interface FbService
public ServiceRequestBuffer createServiceRequestBuffer()
createServiceRequestBuffer
in interface FbService
protected void checkConnected() throws java.sql.SQLException
AbstractFbAttachment
SQLException
if it isn't connected.checkConnected
in class AbstractFbAttachment<JnaServiceConnection>
java.sql.SQLException
public byte[] getServiceInfo(ServiceParameterBuffer serviceParameterBuffer, ServiceRequestBuffer serviceRequestBuffer, int maxBufferLength) throws java.sql.SQLException
FbService
getServiceInfo
in interface FbService
serviceParameterBuffer
- Service parameters (can be null)serviceRequestBuffer
- Service request infomaxBufferLength
- Maximum response buffer length to usemaxBufferLength
java.sql.SQLException
- For errors retrieving the information.public void startServiceAction(ServiceRequestBuffer serviceRequestBuffer) throws java.sql.SQLException
FbService
startServiceAction
in interface FbService
serviceRequestBuffer
- Service action request detailsjava.sql.SQLException
- For errors starting the service action.public void attach() throws java.sql.SQLException
FbAttachment
attach
in interface FbAttachment
java.sql.SQLException
protected 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.SQLException
public int getHandle()
getHandle
in interface FbAttachment
getHandle
in interface FbService
public com.sun.jna.ptr.IntByReference getJnaHandle()
public void processStatusVector(ISC_STATUS[] statusVector, WarningMessageCallback warningMessageCallback) throws java.sql.SQLException
java.sql.SQLException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.