Package org.firebirdsql.gds.ng.jna
Class AbstractNativeDatabaseFactory
- java.lang.Object
- 
- org.firebirdsql.gds.ng.jna.AbstractNativeDatabaseFactory
 
- 
- All Implemented Interfaces:
- FbDatabaseFactory
 - Direct Known Subclasses:
- FbClientDatabaseFactory,- FbEmbeddedDatabaseFactory,- FbLocalDatabaseFactory
 
 public abstract class AbstractNativeDatabaseFactory extends java.lang.Object implements FbDatabaseFactory Common implementation for client library and embedded database factory.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Constructor SummaryConstructors Constructor Description AbstractNativeDatabaseFactory()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description JnaDatabaseconnect(IConnectionProperties connectionProperties)Connects to a Firebird server based on the supplied connection properties.protected abstract FbClientLibrarycreateClientLibrary()Creates and initialize a new instance of the client library.protected <T extends IAttachProperties<T>>
 TfilterProperties(T attachProperties)Allows the database factory to perform modification of the attach properties before use.protected FbClientLibrarygetClientLibrary()Gets the current instance of the client library.JnaServiceserviceConnect(IServiceProperties serviceProperties)Connects to the service manager of a Firebird server with the supplied service properties.
 
- 
- 
- 
Method Detail- 
connectpublic JnaDatabase connect(IConnectionProperties connectionProperties) throws java.sql.SQLException Description copied from interface:FbDatabaseFactoryConnects to a Firebird server based on the supplied connection properties.The FbDatabaseinstance will be connected to the server, but is not yet attached.- Specified by:
- connectin interface- FbDatabaseFactory
- Parameters:
- connectionProperties- Connection properties
- Returns:
- Database instance
- Throws:
- java.sql.SQLException
 
 - 
serviceConnectpublic JnaService serviceConnect(IServiceProperties serviceProperties) throws java.sql.SQLException Description copied from interface:FbDatabaseFactoryConnects to the service manager of a Firebird server with the supplied service properties.- Specified by:
- serviceConnectin interface- FbDatabaseFactory
- Parameters:
- serviceProperties- Service properties
- Returns:
- Service instance
- Throws:
- java.sql.SQLException
 
 - 
getClientLibraryprotected FbClientLibrary getClientLibrary() Gets the current instance of the client library.Most implementations should not override this method (contrary to previous versions of Jaybird), to ensure native libraries are properly disposed of. - Returns:
- Client library instance.
 
 - 
createClientLibraryprotected abstract FbClientLibrary createClientLibrary() Creates and initialize a new instance of the client library.Instances should not be cached (caching - if any - is the responsibility of the caller). - Returns:
- new client library instance
- Since:
- 4.0
 
 - 
filterPropertiesprotected <T extends IAttachProperties<T>> T filterProperties(T attachProperties) Allows the database factory to perform modification of the attach properties before use.Implementations should be prepared to handle immutable attach properties. Implementations are strongly advised to copy the attach properties before modification and return this copy. - Type Parameters:
- T- Type of attach properties
- Parameters:
- attachProperties- Attach properties
- Returns:
- Filtered properties
 
 
- 
 
-