Package net.officefloor.jdbc
Class DataSourceManagedObjectSource
java.lang.Object
net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource<O,F>
net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource<None,None>
net.officefloor.jdbc.AbstractJdbcManagedObjectSource
net.officefloor.jdbc.DataSourceManagedObjectSource
- All Implemented Interfaces:
ManagedObject,ManagedObjectSource<None,None>
- Direct Known Subclasses:
H2DataSourceManagedObjectSource,PostgreSqlDataSourceManagedObjectSource
public class DataSourceManagedObjectSource
extends AbstractJdbcManagedObjectSource
implements ManagedObject
ManagedObjectSource for a DataSource.- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested classes/interfaces inherited from class net.officefloor.jdbc.AbstractJdbcManagedObjectSource
AbstractJdbcManagedObjectSource.ConnectionConnectivity, AbstractJdbcManagedObjectSource.Connectivity, AbstractJdbcManagedObjectSource.ConnectivityFactoryNested classes/interfaces inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller<K extends Enum<K>>, AbstractAsyncManagedObjectSource.ExecutionLabeller, AbstractAsyncManagedObjectSource.Labeller<K extends Enum<K>>, AbstractAsyncManagedObjectSource.MetaDataContext<O extends Enum<O>,F extends Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext -
Field Summary
Fields inherited from class net.officefloor.jdbc.AbstractJdbcManagedObjectSource
PROPERTY_DATA_SOURCE_FACTORY, PROPERTY_DATA_SOURCE_VALIDATE_SQL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ManagedObjectSynchronously obtains theManagedObject.Obtains the object being managed.protected voidsetupActive(ManagedObjectSourceContext<None> mosContext) Sets up theManagedObjectSourcefor active use.protected voidSets up the meta-data.voidstop()Called to notify that theOfficeFlooris being closed.Methods inherited from class net.officefloor.jdbc.AbstractJdbcManagedObjectSource
closeDataSource, getConnectionPoolDataSourceFactory, getDataSourceFactory, loadMetaData, loadSpecification, loadValidateConnectivity, newConnectionPoolDataSource, newDataSource, setConnectivity, validateConnectivityMethods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObjectMethods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
getSpecification, init, start
-
Constructor Details
-
DataSourceManagedObjectSource
public DataSourceManagedObjectSource()
-
-
Method Details
-
setupMetaData
protected void setupMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None, None> context) throws ExceptionDescription copied from class:AbstractJdbcManagedObjectSourceSets up the meta-data.- Specified by:
setupMetaDatain classAbstractJdbcManagedObjectSource- Parameters:
context-AbstractAsyncManagedObjectSource.MetaDataContext.- Throws:
Exception- If fails to loader further meta-data.
-
setupActive
Description copied from class:AbstractJdbcManagedObjectSourceSets up theManagedObjectSourcefor active use.- Specified by:
setupActivein classAbstractJdbcManagedObjectSource- Parameters:
mosContext-ManagedObjectSourceContext.- Throws:
Exception- If fails to setup.
-
stop
public void stop()Description copied from interface:ManagedObjectSourceCalled to notify that the
OfficeFlooris being closed.On return from this method, no further
ProcessStateinstances may be invoked.- Specified by:
stopin interfaceManagedObjectSource<None,None> - Overrides:
stopin classAbstractAsyncManagedObjectSource<None,None>
-
getManagedObject
Description copied from class:AbstractManagedObjectSourceSynchronously obtains theManagedObject.- Specified by:
getManagedObjectin classAbstractManagedObjectSource<None,None> - Returns:
ManagedObject.- Throws:
Throwable- If fails to obtain theManagedObject.
-
getObject
Description copied from interface:ManagedObjectObtains the object being managed.- Specified by:
getObjectin interfaceManagedObject- Returns:
- Object being managed.
- Throws:
Throwable- Indicating failed to obtain the object for use.
-