Package net.officefloor.server.http
Class AbstractHttpServerImplementationTest.CancelConnectionManagedObjectSource
- 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.server.http.AbstractHttpServerImplementationTest.CancelConnectionManagedObjectSource
-
- All Implemented Interfaces:
ManagedObject,ManagedObjectPool,ManagedObjectSource<None,None>
- Enclosing class:
- AbstractHttpServerImplementationTest<M>
public static class AbstractHttpServerImplementationTest.CancelConnectionManagedObjectSource extends AbstractManagedObjectSource<None,None> implements ManagedObject, ManagedObjectPool
-
-
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 CancelConnectionManagedObjectSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidempty()Invoked on close of theOfficeFloorto allow handling pooledManagedObjectinstances.protected ManagedObjectgetManagedObject()Synchronously obtains theManagedObject.java.lang.ObjectgetObject()Obtains the object being managed.protected voidloadMetaData(AbstractAsyncManagedObjectSource.MetaDataContext<None,None> context)Overridden to load meta-data.protected voidloadSpecification(AbstractAsyncManagedObjectSource.SpecificationContext context)Overridden to load specifications.voidlostManagedObject(ManagedObject managedObject, java.lang.Throwable cause)Flags that theManagedObjectis lost.voidreturnManagedObject(ManagedObject managedObject)Returns an instance to the pool.-
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, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.frame.api.managedobject.pool.ManagedObjectPool
getSourcedManagedObject, sourceManagedObject
-
-
-
-
Method Detail
-
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.
-
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.
-
getObject
public java.lang.Object getObject() throws java.lang.ThrowableDescription copied from interface:ManagedObjectObtains the object being managed.- Specified by:
getObjectin interfaceManagedObject- Returns:
- Object being managed.
- Throws:
java.lang.Throwable- Indicating failed to obtain the object for use.
-
returnManagedObject
public void returnManagedObject(ManagedObject managedObject)
Description copied from interface:ManagedObjectPoolReturns an instance to the pool.- Specified by:
returnManagedObjectin interfaceManagedObjectPool- Parameters:
managedObject-ManagedObject.
-
lostManagedObject
public void lostManagedObject(ManagedObject managedObject, java.lang.Throwable cause)
Description copied from interface:ManagedObjectPoolFlags that theManagedObjectis lost.- Specified by:
lostManagedObjectin interfaceManagedObjectPool- Parameters:
managedObject-ManagedObjectto no longer be used.cause- Cause for theManagedObjectto be lost.
-
empty
public void empty()
Description copied from interface:ManagedObjectPoolInvoked on close of theOfficeFloorto allow handling pooledManagedObjectinstances.- Specified by:
emptyin interfaceManagedObjectPool
-
-