Package net.officefloor.server.http.mock
Class MockManagedObjectContext
- java.lang.Object
-
- net.officefloor.server.http.mock.MockManagedObjectContext
-
- All Implemented Interfaces:
ManagedObjectContext
public class MockManagedObjectContext extends java.lang.Object implements ManagedObjectContext
MockManagedObjectContextthat just runs theProcessSafeOperation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description MockManagedObjectContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBoundName()Obtains the name thisManagedObjectis bound under.java.util.logging.LoggergetLogger()Obtains theLoggerfor theManagedObject.<R,T extends java.lang.Throwable>
Rrun(ProcessSafeOperation<R,T> operation)Undertakes aProcessSafeOperation.
-
-
-
Method Detail
-
getBoundName
public java.lang.String 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
public java.util.logging.Logger getLogger()
Description copied from interface:ManagedObjectContextObtains theLoggerfor theManagedObject.- Specified by:
getLoggerin interfaceManagedObjectContext- Returns:
Loggerfor theManagedObject.
-
run
public <R,T extends java.lang.Throwable> R run(ProcessSafeOperation<R,T> operation) throws T extends java.lang.Throwable
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.T extends java.lang.Throwable
-
-