org.ocap.resource
Interface ResourceExceptionAction
public interface ResourceExceptionAction
A computation to be performed within a specific resource context.
The computation is performed by invoking doResourceAction
on
a given ResourceContext
.
This interface is used only for computations that may throw checked exceptions;
computations that do not throw checked exceptions may use ResourceAction
instead.
- Author:
- Aaron Kamienski
- See Also:
ResourceContext
,
ResourceContext.doResourceAction(ResourceExceptionAction)
,
ResourceAction
executeAction
Object executeAction()
throws Exception
- Performs the computation.
This method will be called by
ResourceContext.doResourceAction
.
All resource reservation operations performed as part of this computation
will implicitly have access to the ResourceContext
and its
attributes.
- Returns:
- a class-dependent value that may represent the results of the
computation
- Throws:
Exception
- an exceptional condition that occurred during the computation
(includes checked or unchecked exceptions)
Error
- unchecked exceptions may be thrown- See Also:
ResourceContext.doResourceAction(ResourceExceptionAction)