public interface Resumable
Modifier and Type | Method and Description |
---|---|
void |
resume(ExecutionContext context,
Object suspendedState)
Resumes this resumable in the given execution context
context , passing
the suspended state suspendedState to it. |
void resume(ExecutionContext context, Object suspendedState) throws ResolvedControlThrowable
context
, passing
the suspended state suspendedState
to it.
This method throws a ResolvedControlThrowable
:
this method is expected to have resolved non-local control changes up to the point
of its invocation.
This method is called by the call executor when resuming a previously suspended
function call, possibly with a different execution context. suspendedState
is guaranteed by the executor to be equivalent to the suspended state registered
by the call to UnresolvedControlThrowable.resolve(Resumable, Object)
. Equivalence here
means that the class will be equal to that of the state object previously registered;
however, the actual instance passed to this method may be a clone or a (serialised
and) de-serialised version of the original object.
Implementations of this method may safely assume that context
is not
null
.
context
- execution context, non-null
when called by a call executorsuspendedState
- suspended state, equivalent to the suspended state registered
with the call executorResolvedControlThrowable
- if the resumed call initiates a non-local control changeCopyright © 2016. All rights reserved.