Interface Continuation<R>

Type Parameters:
R - the result type
All Known Implementing Classes:
AbstractPersistenceEnvironment.DefaultFailureContinuation, NullImplementation.NullContinuation, NullImplementation.NullPersistentStore.Token

public interface Continuation<R>
Continuation interface is used to implement asynchronous post-processing, the pattern that is also known as the "Continuation-passing style".

Most commonly, a continuation can be used to encode a single program control mechanism (i.e. a logical "return"). Advanced usages may also need to encode multiple control mechanisms (e.g. an exceptional execution path). For such usages, each control path could be explicitly represented as a separate Continuation, e.g.:

 void doAsync(Continuation<Result> contNormal, Continuation<Exception> contExceptional);
 
Author:
gg 02.17.2011
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Resume the execution after the completion of an asynchronous call.
  • Method Details

    • proceed

      void proceed(R r)
      Resume the execution after the completion of an asynchronous call.
      Parameters:
      r - the result of the execution preceding this continuation