Interface SynchronousActivityStarting

  • All Superinterfaces:
    ActivityStarting

    public interface SynchronousActivityStarting
    extends ActivityStarting
    This interface extends ActivityStarting with the synchronous start or resuming of activities. This allows to wait for the successful start and to retrieve the GUIContext of the started/resumed activity/application. For instance, requests by web clients are handled this way: A request to start an activity is sent to the web server, the activity is started synchronously and the GUIContext (the generated HTML-document) is sent as reply to the client request.
    Additionally this interface provides the means to register a callback for activity state changes just like for instances. For instance this allows for GUI contexts that are displayed remotely to be closed appropriately.
    Important: This does only work when the designated activity is executed on the runtime manager providing this interface. Otherwise a WrongRuntimeManagerException will be thrown.

    Besides the retrieval of the GUIContext this interface also provides the means to register a listener for activity state changes, that is closing, suspending, resetting, failing or resuming an activity. Note that notifying the resume of an activity will only work if the activity is started on the very same runtime manager (ActivityStarting) again. Such a registered listener can unregister any time.

    This interface may be provided by a runtime manager but does not need to. It delegates to the corresponding execution manager, encapsulates the asynchronous calls and registers for the state notifications. If the runtime manager does not provide this interface, the client has to use the execution manager directly ( ActivityStarting).