Package net.officefloor.r2dbc
Class R2dbcManagedObjectSource
- 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.r2dbc.R2dbcManagedObjectSource
-
- All Implemented Interfaces:
ManagedObjectSource<None,None>
public class R2dbcManagedObjectSource extends AbstractManagedObjectSource<None,None>
ManagedObjectSourcefor R2DBCConnection.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
AbstractAsyncManagedObjectSource.DependencyLabeller<K extends java.lang.Enum<K>>, AbstractAsyncManagedObjectSource.ExecutionLabeller, AbstractAsyncManagedObjectSource.Labeller<K extends java.lang.Enum<K>>, AbstractAsyncManagedObjectSource.MetaDataContext<O extends java.lang.Enum<O>,F extends java.lang.Enum<F>>, AbstractAsyncManagedObjectSource.SpecificationContext
-
-
Constructor Summary
Constructors Constructor Description R2dbcManagedObjectSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.r2dbc.pool.ConnectionPoolgetConnectionPool()Obtains theConnectionPool.protected ManagedObjectgetManagedObject()Synchronously obtains theManagedObject.protected voidloadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,None> context)Overridden to load meta-data.protected voidloadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)Overridden to load specifications.voidstart(ManagedObjectExecuteContext<None> context)Called once afterManagedObjectSource.init(ManagedObjectSourceContext)to indicate thisManagedObjectSourceshould start execution.voidstop()Called to notify that theOfficeFlooris being closed.-
Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractManagedObjectSource
sourceManagedObject
-
Methods inherited from class net.officefloor.frame.api.managedobject.source.impl.AbstractAsyncManagedObjectSource
getSpecification, init
-
-
-
-
Method Detail
-
getConnectionPool
public io.r2dbc.pool.ConnectionPool getConnectionPool()
Obtains theConnectionPool.- Returns:
ConnectionPool.
-
loadSpecification
protected void loadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)
Description copied from class:AbstractAsyncManagedObjectSourceOverridden to load specifications.- Specified by:
loadSpecificationin classAbstractAsyncManagedObjectSource<None,None>- Parameters:
context- Specifications.
-
loadMetaData
protected void loadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,None> context) throws java.lang.Exception
Description copied from class:AbstractAsyncManagedObjectSourceOverridden to load meta-data.- Specified by:
loadMetaDatain classAbstractAsyncManagedObjectSource<None,None>- Parameters:
context- Meta-data.- Throws:
java.lang.Exception- If fails to load the meta-data.
-
start
public void start(ManagedObjectExecuteContext<None> context) throws java.lang.Exception
Description copied from interface:ManagedObjectSourceCalled once after
ManagedObjectSource.init(ManagedObjectSourceContext)to indicate thisManagedObjectSourceshould start execution.On invocation of this method,
ProcessStateinstances may be invoked via theManagedObjectExecuteContext.- Specified by:
startin interfaceManagedObjectSource<None,None>- Overrides:
startin classAbstractAsyncManagedObjectSource<None,None>- Parameters:
context-ManagedObjectExecuteContextto use in starting thisManagedObjectSource.- Throws:
java.lang.Exception- Should theManagedObjectSourcefail to start execution.
-
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
protected ManagedObject getManagedObject() throws java.lang.Throwable
Description copied from class:AbstractManagedObjectSourceSynchronously obtains theManagedObject.- Specified by:
getManagedObjectin classAbstractManagedObjectSource<None,None>- Returns:
ManagedObject.- Throws:
java.lang.Throwable- If fails to obtain theManagedObject.
-
-