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.StringPROPERTY_DATABASE_NAMEPropertyfor the database.static java.lang.StringPROPERTY_PASSWORDPropertyfor the password.static java.lang.StringPROPERTY_PORTPropertyfor the port.static java.lang.StringPROPERTY_SERVER_NAMEPropertyfor the server name.static java.lang.StringPROPERTY_USERPropertyfor 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.ConnectionPoolDataSourcecreateConnectionPoolDataSource(SourceContext context)Creates theConnectionPoolDataSource.default javax.sql.DataSourcecreateDataSource(SourceContext context)Creates theDataSource.static voidloadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)Loads the specification.
-
-
-
Field Detail
-
PROPERTY_SERVER_NAME
static final java.lang.String PROPERTY_SERVER_NAME
Propertyfor the server name.- See Also:
- Constant Field Values
-
PROPERTY_PORT
static final java.lang.String PROPERTY_PORT
Propertyfor the port.- See Also:
- Constant Field Values
-
PROPERTY_DATABASE_NAME
static final java.lang.String PROPERTY_DATABASE_NAME
Propertyfor the database.- See Also:
- Constant Field Values
-
PROPERTY_USER
static final java.lang.String PROPERTY_USER
Propertyfor the user name.- See Also:
- Constant Field Values
-
PROPERTY_PASSWORD
static final java.lang.String PROPERTY_PASSWORD
Propertyfor 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.ExceptionConfigures 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:DataSourceFactoryCreates theDataSource.- Specified by:
createDataSourcein interfaceDataSourceFactory- Parameters:
context-SourceContextto 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:ConnectionPoolDataSourceFactoryCreates theConnectionPoolDataSource.- Specified by:
createConnectionPoolDataSourcein interfaceConnectionPoolDataSourceFactory- Parameters:
context-SourceContextto configure theConnectionPoolDataSource.- Returns:
ConnectionPoolDataSource.- Throws:
java.lang.Exception- If fails to create theConnectionPoolDataSource.
-
-