Module org.firebirdsql.jna
Package org.firebirdsql.gds.ng.jna
Class JnaConnection<T extends org.firebirdsql.gds.ng.IAttachProperties<T>,C extends JnaAttachment>
java.lang.Object
org.firebirdsql.gds.ng.AbstractConnection<T,C>
org.firebirdsql.gds.ng.jna.JnaConnection<T,C>
- Type Parameters:
T
- Type of attach propertiesC
- Type of connection handle
- Direct Known Subclasses:
JnaDatabaseConnection
,JnaServiceConnection
public abstract class JnaConnection<T extends org.firebirdsql.gds.ng.IAttachProperties<T>,C extends JnaAttachment>
extends org.firebirdsql.gds.ng.AbstractConnection<T,C>
Class handling the initial setup of the JNA connection.
- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Field Summary
Fields inherited from class org.firebirdsql.gds.ng.AbstractConnection
attachProperties
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
JnaConnection
(FbClientLibrary clientLibrary, T attachProperties, org.firebirdsql.encodings.IEncodingFactory encodingFactory) Creates a JnaConnection (without establishing a connection to the server). -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
createAttachUrl
(org.firebirdsql.gds.impl.DbAttachInfo dbAttachInfo, T attachProperties) Gets the attach URL for the library.final FbClientLibrary
protected void
processStatusVector
(ISC_STATUS[] statusVector, org.firebirdsql.gds.ng.WarningMessageCallback warningMessageCallback) protected static String
toAttachUrl
(org.firebirdsql.gds.impl.DbAttachInfo dbAttachInfo) Builds the attach URL for the library.Methods inherited from class org.firebirdsql.gds.ng.AbstractConnection
createDbCryptCallback, getAttachProperties, getEncoding, getEncodingDefinition, getEncodingFactory, identify, isLockedByCurrentThread, withLock
-
Constructor Details
-
JnaConnection
protected JnaConnection(FbClientLibrary clientLibrary, T attachProperties, org.firebirdsql.encodings.IEncodingFactory encodingFactory) throws SQLException Creates a JnaConnection (without establishing a connection to the server).- Parameters:
clientLibrary
- Client library to useattachProperties
- Attach propertiesencodingFactory
- Encoding factory- Throws:
SQLException
-
-
Method Details
-
createAttachUrl
protected abstract String createAttachUrl(org.firebirdsql.gds.impl.DbAttachInfo dbAttachInfo, T attachProperties) throws SQLException - Throws:
SQLException
-
getClientLibrary
- Returns:
- The client library instance associated with the connection.
-
processStatusVector
protected void processStatusVector(ISC_STATUS[] statusVector, org.firebirdsql.gds.ng.WarningMessageCallback warningMessageCallback) throws SQLException - Throws:
SQLException
-
getAttachUrl
Gets the attach URL for the library.- Returns:
- Attach URL
-
toAttachUrl
Builds the attach URL for the library.- Returns:
- Attach URL
-