Interface ManagedObjectContext
-
- All Known Implementing Classes:
ManagedObjectUserStandAlone,MockManagedObjectContext
public interface ManagedObjectContextContext for theManagedObject.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract 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
java.lang.String getBoundName()
Obtains the name this
ManagedObjectis bound under.This is useful to have a unique name identifying the
ManagedObject.- Returns:
- Name this
ManagedObjectis bound under.
-
getLogger
java.util.logging.Logger getLogger()
Obtains theLoggerfor theManagedObject.- Returns:
Loggerfor theManagedObject.
-
run
<R,T extends java.lang.Throwable> R run(ProcessSafeOperation<R,T> operation) throws T extends java.lang.Throwable
Undertakes aProcessSafeOperation.- Type Parameters:
R- Return type from operationT- PossibleThrowabletype from operation.- Parameters:
operation-ProcessSafeOperation.- Returns:
- Return value.
- Throws:
T- PossibleThrowable.T extends java.lang.Throwable
-
-