Package net.officefloor.server.http.mock
Class MockManagedObjectContext
java.lang.Object
net.officefloor.server.http.mock.MockManagedObjectContext
- All Implemented Interfaces:
ManagedObjectContext
Mock
ManagedObjectContext that just runs the
ProcessSafeOperation.- Author:
- Daniel Sagenschneider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObtains the name thisManagedObjectis bound under.Obtains theLoggerfor theManagedObject.<R,T extends Throwable>
Rrun(ProcessSafeOperation<R, T> operation) Undertakes aProcessSafeOperation.
-
Constructor Details
-
MockManagedObjectContext
public MockManagedObjectContext()
-
-
Method Details
-
getBoundName
Description copied from interface:ManagedObjectContextObtains the name this
ManagedObjectis bound under.This is useful to have a unique name identifying the
ManagedObject.- Specified by:
getBoundNamein interfaceManagedObjectContext- Returns:
- Name this
ManagedObjectis bound under.
-
getLogger
Description copied from interface:ManagedObjectContextObtains theLoggerfor theManagedObject.- Specified by:
getLoggerin interfaceManagedObjectContext- Returns:
Loggerfor theManagedObject.
-
run
Description copied from interface:ManagedObjectContextUndertakes aProcessSafeOperation.- Specified by:
runin interfaceManagedObjectContext- Type Parameters:
R- Return type from operationT- PossibleThrowabletype from operation.- Parameters:
operation-ProcessSafeOperation.- Returns:
- Return value.
- Throws:
T- PossibleThrowable.
-