org.araneaframework.framework
Interface ContinuationManagerContext

All Superinterfaces:
Serializable
All Known Implementing Classes:
StandardContinuationFilterService

public interface ContinuationManagerContext
extends Serializable

This context allows to abort the current execution flow and pass control to a provided continuation service. The continuation service will be rendered on the current and subsequent request until it explicitly passes control back using ContinuationContext.finish(). This will end the continuation and restore control back.

Author:
"Toomas Römer" , Jevgeni Kabanov (ekabanov at araneaframework dot org)

Method Summary
 boolean isRunning()
          Returns whether a continuation is already registered during this request and is ready to run.
 void runOnce(Service continuation)
          Does same as start(Service), however after the first request passes through the continuation will return control back to the starting component.
 void start(Service continuation)
          Starts the continuation (by registering it and then throwing and exception, thus passing control to the continuation manager).
 

Method Detail

isRunning

public boolean isRunning()
Returns whether a continuation is already registered during this request and is ready to run. In such a case it is unsafe to override the continuation using start(Service).


start

public void start(Service continuation)
Starts the continuation (by registering it and then throwing and exception, thus passing control to the continuation manager).


runOnce

public void runOnce(Service continuation)
Does same as start(Service), however after the first request passes through the continuation will return control back to the starting component.