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