Package net.officefloor.frame.test
Class TestManagedObject<O extends Enum<O>,F extends Enum<F>>
java.lang.Object
net.officefloor.frame.test.TestManagedObject<O,F>
- All Implemented Interfaces:
AsynchronousManagedObject,ContextAwareManagedObject,CoordinatingManagedObject<O>,ManagedObject
- Direct Known Subclasses:
TestObject
public class TestManagedObject<O extends Enum<O>,F extends Enum<F>>
extends Object
implements ContextAwareManagedObject, AsynchronousManagedObject, CoordinatingManagedObject<O>, ManagedObject
Test
ManagedObjectPool.- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassTestManagedObjectSource.classRecycles theManagedObject. -
Field Summary
FieldsModifier and TypeFieldDescriptionPossible failure in loading theManagedObjectContext.OptionalConsumerto enhance theManagedObjectSourceMetaData.booleanIndicates ifAsynchronousManagedObject.booleanIndicates ifContextAwareManagedObject.booleanIndicates ifCoordinatingManagedObject.booleanIndicates whether to delay sourcing theManagedObject.booleanFlags whether to recycle theManagedObject.booleanIndicates whether to provide a recycleManagedFunction.Possible failure in loading theObjectRegistry.final ManagedObjectBuilder<F>final ManagingOfficeBuilder<F>Lost cause ofManagedObjectfor theManagedObjectPool.LostManagedObjectto theManagedObjectPool.ReturnedManagedObjectto theManagedObjectPool.SourcedManagedObjectviaManagedObjectPool.Failure in sourcingManagedObjectviaManagedObjectPool.booleanIndicates if theManagedObjectPoolhas been emptied.Consumerto be provided theRecycleManagedObjectParameteron recycling.ManagedObjectprovided to the recycleManagedFunction.Possible failure in recycling theManagedObject.Possible failure in registering theAsynchronousContext.Possible failure in sourcing theManagedObject.Possible propagation failure in sourcing theManagedObject. -
Constructor Summary
ConstructorsConstructorDescriptionTestManagedObject(String managedObjectName, AbstractOfficeConstructTestCase testCase) Instantiate and setup.TestManagedObject(String managedObjectName, AbstractOfficeConstructTestCase testCase, boolean isPool) Instantiate and setup.TestManagedObject(String managedObjectName, ConstructTestSupport construct) Instantiate and setup.TestManagedObject(String managedObjectName, ConstructTestSupport construct, boolean isPool) Instantiate and setup. -
Method Summary
Modifier and TypeMethodDescriptionObtains the object being managed.voidloadObjects(ObjectRegistry<O> registry) =================== CoordinatingManagedObject ==================voidsetAsynchronousContext(AsynchronousContext listener) ================== AsynchronousManagedObject ==================voidProvides theManagedObjectContextto theManagedObject.
-
Field Details
-
managedObjectBuilder
-
managingOfficeBuilder
-
isContextAwareManagedObject
public boolean isContextAwareManagedObjectIndicates ifContextAwareManagedObject. -
isAsynchronousManagedObject
public boolean isAsynchronousManagedObjectIndicates ifAsynchronousManagedObject. -
isCoordinatingManagedObject
public boolean isCoordinatingManagedObjectIndicates ifCoordinatingManagedObject. -
enhanceMetaData
public Consumer<AbstractAsyncManagedObjectSource.MetaDataContext<O extends Enum<O>,F extends Enum<F>>> enhanceMetaDataOptionalConsumerto enhance theManagedObjectSourceMetaData. -
sourcePropagateFailure
Possible propagation failure in sourcing theManagedObject. -
isDelaySource
public boolean isDelaySourceIndicates whether to delay sourcing theManagedObject. -
sourceFailure
Possible failure in sourcing theManagedObject. -
contextAwareFailure
Possible failure in loading theManagedObjectContext. -
registerAsynchronousListenerFailure
Possible failure in registering theAsynchronousContext. -
loadObjectsFailure
Possible failure in loading theObjectRegistry. -
isRecycleFunction
public boolean isRecycleFunctionIndicates whether to provide a recycleManagedFunction. -
isRecycle
public boolean isRecycleFlags whether to recycle theManagedObject. -
recycleConsumer
Consumerto be provided theRecycleManagedObjectParameteron recycling. -
recycleFailure
Possible failure in recycling theManagedObject. -
managedObjectExecuteContext
-
managedObjectServiceContext
-
managedObjectUser
-
managedObjectContext
-
asynchronousContext
-
objectRegistry
-
recycledManagedObject
ManagedObjectprovided to the recycleManagedFunction. -
pooledSourcedManagedObject
SourcedManagedObjectviaManagedObjectPool. -
pooledSourceFailure
Failure in sourcingManagedObjectviaManagedObjectPool. -
pooledReturnedManagedObject
ReturnedManagedObjectto theManagedObjectPool. -
pooledLostManagedObject
LostManagedObjectto theManagedObjectPool. -
pooledLostCause
Lost cause ofManagedObjectfor theManagedObjectPool. -
poolEmptied
public boolean poolEmptiedIndicates if theManagedObjectPoolhas been emptied.
-
-
Constructor Details
-
TestManagedObject
Instantiate and setup.- Parameters:
managedObjectName- Name of theManagedObject.testCase-AbstractOfficeConstructTestCase.
-
TestManagedObject
public TestManagedObject(String managedObjectName, AbstractOfficeConstructTestCase testCase, boolean isPool) Instantiate and setup.- Parameters:
managedObjectName- Name for theManagedObject.testCase-AbstractOfficeConstructTestCase.isPool- Indicates if pool theManagedObject.
-
TestManagedObject
Instantiate and setup.- Parameters:
managedObjectName- Name of theManagedObject.construct-ConstructTestSupport.
-
TestManagedObject
Instantiate and setup.- Parameters:
managedObjectName- Name for theManagedObject.construct-ConstructTestSupport.isPool- Indicates if pool theManagedObject.
-
-
Method Details
-
setManagedObjectContext
Description copied from interface:ContextAwareManagedObjectProvides theManagedObjectContextto theManagedObject.- Specified by:
setManagedObjectContextin interfaceContextAwareManagedObject- Parameters:
context-ManagedObjectContext.
-
setAsynchronousContext
================== AsynchronousManagedObject ==================- Specified by:
setAsynchronousContextin interfaceAsynchronousManagedObject- Parameters:
listener-AsynchronousContext.
-
loadObjects
=================== CoordinatingManagedObject ==================- Specified by:
loadObjectsin interfaceCoordinatingManagedObject<O extends Enum<O>>- Parameters:
registry- Registry of the Objects for theManagedObjectinstances.- Throws:
Throwable- Should thisCoordinatingManagedObjectfail to load 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.
-