Package net.officefloor.jdbc.h2
Interface H2DataSourceFactory
-
- All Superinterfaces:
ConnectionPoolDataSourceFactory
,DataSourceFactory
- All Known Implementing Classes:
H2DataSourceManagedObjectSource
,H2ReadOnlyConnectionManagedObjectSource
public interface H2DataSourceFactory extends DataSourceFactory, ConnectionPoolDataSourceFactory
- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_PASSWORD
Property
for password.static java.lang.String
PROPERTY_URL
Property
forURL
.static java.lang.String
PROPERTY_USER
Property
for user.
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default javax.sql.ConnectionPoolDataSource
createConnectionPoolDataSource(SourceContext context)
Creates theConnectionPoolDataSource
.default javax.sql.DataSource
createDataSource(SourceContext context)
Creates theDataSource
.static void
loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Loads the specification.
-
-
-
Field Detail
-
PROPERTY_URL
static final java.lang.String PROPERTY_URL
Property
forURL
.- See Also:
- Constant Field Values
-
PROPERTY_USER
static final java.lang.String PROPERTY_USER
Property
for user.- See Also:
- Constant Field Values
-
PROPERTY_PASSWORD
static final java.lang.String PROPERTY_PASSWORD
Property
for password.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadSpecification
static void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Loads the specification.- Parameters:
context
-AbstractAsyncManagedObjectSource.SpecificationContext
.
-
createDataSource
default javax.sql.DataSource createDataSource(SourceContext context) throws java.lang.Exception
Description copied from interface:DataSourceFactory
Creates theDataSource
.- Specified by:
createDataSource
in interfaceDataSourceFactory
- Parameters:
context
-SourceContext
to configure theDataSource
.- Returns:
DataSource
.- Throws:
java.lang.Exception
- If fails to create theDataSource
.
-
createConnectionPoolDataSource
default javax.sql.ConnectionPoolDataSource createConnectionPoolDataSource(SourceContext context) throws java.lang.Exception
Description copied from interface:ConnectionPoolDataSourceFactory
Creates theConnectionPoolDataSource
.- Specified by:
createConnectionPoolDataSource
in interfaceConnectionPoolDataSourceFactory
- Parameters:
context
-SourceContext
to configure theConnectionPoolDataSource
.- Returns:
ConnectionPoolDataSource
.- Throws:
java.lang.Exception
- If fails to create theConnectionPoolDataSource
.
-
-