Package net.officefloor.jdbc.postgresql
Interface PostgreSqlDataSourceFactory
-
- All Superinterfaces:
ConnectionPoolDataSourceFactory
,DataSourceFactory
- All Known Implementing Classes:
PostgreSqlDataSourceManagedObjectSource
,PostgreSqlReadOnlyConnectionManagedObjectSource
public interface PostgreSqlDataSourceFactory extends DataSourceFactory, ConnectionPoolDataSourceFactory
PostgreSqlDataSourceFactory
.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_DATABASE_NAME
Property
for the database.static java.lang.String
PROPERTY_PASSWORD
Property
for the password.static java.lang.String
PROPERTY_PORT
Property
for the port.static java.lang.String
PROPERTY_SERVER_NAME
Property
for the server name.static java.lang.String
PROPERTY_USER
Property
for the user name.
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static <S extends org.postgresql.ds.common.BaseDataSource>
SconfigureDataSource(S dataSource, SourceContext context)
Configures theBaseDataSource
.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_SERVER_NAME
static final java.lang.String PROPERTY_SERVER_NAME
Property
for the server name.- See Also:
- Constant Field Values
-
PROPERTY_PORT
static final java.lang.String PROPERTY_PORT
Property
for the port.- See Also:
- Constant Field Values
-
PROPERTY_DATABASE_NAME
static final java.lang.String PROPERTY_DATABASE_NAME
Property
for the database.- See Also:
- Constant Field Values
-
PROPERTY_USER
static final java.lang.String PROPERTY_USER
Property
for the user name.- See Also:
- Constant Field Values
-
PROPERTY_PASSWORD
static final java.lang.String PROPERTY_PASSWORD
Property
for the password.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadSpecification
static void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Loads the specification.- Parameters:
context
-AbstractAsyncManagedObjectSource.SpecificationContext
.
-
configureDataSource
static <S extends org.postgresql.ds.common.BaseDataSource> S configureDataSource(S dataSource, SourceContext context) throws java.lang.Exception
Configures theBaseDataSource
.- Parameters:
dataSource
-BaseDataSource
.context
-SourceContext
.- Throws:
java.lang.Exception
- If fails to configure theBaseDataSource
.
-
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
.
-
-