public interface RemoteGUIManager extends GUIManager, ActivityStateNotification
RemoteGUIManager extends a normal GUI manager by the means to
create local GUI contexts based on a transferred GUI context. That is a
component is executed on a remote machine having an appropriate GUI context.
This GUI context can be used remotely for instance a HTML-GUI. For this to
work, the remote machine offers a web server that publishes the HTML and
interacts with the executed component via the corresponding GUI context
(HTMLContext). Therefore this GUI context cannot be transferred
to the client. But it can be replaced by a simpler GUI context only providing
the URL of the HTMLContext on the web server. This simpler GUI
context implements TransferableGUIContext. However, transferring
alone is not sufficient, someone needs to open the URL in a browser. This is
the responsibility of this RemoteGUIManager. RemoteGUIManager creates GUI contexts for
TransferableGUIContexts that have been received by starting an
activity remotely via
SynchronousActivityStarting.
It then creates a local GUI context similar to the normal GUI contexts except
that the created GUI context does not interact with the corresponding
executable component at least not locally. However, the local GUI context
needs to interact with the remotely executed component. At least closing the
local GUI context needs to be notified to the remotely executed component.
Vice versa terminating the executed component directly via its
ExecutionControlManager, for instance closing the component in
the worklist, needs to be notified to the GUI context. Otherwise the GUI
context can be closed while the component keeps on running or the component
terminates but the GUI context is not closed.
It is the responsibility of the RemoteGUIManager and the created
local GUI contexts to establish this interaction appropriately. For instance,
for a TransferableURLContext (a
TransferableGUIContext) a local GUI context consisting of a
browser having the appropriate URL is provided. When closing this browser,
the local GUI context needs to terminate the remotely executed component via
the corresponding ExecutionControlManager. Vice versa when
terminating the remotely executed component, the local GUI context needs to
be closed. This is achieved via the provided
ActivityStateNotification.
A RemoteGUIManager needs to provide this
ActivityStateNotification. As soon as a termination notification
arrives, the corresponding local GUI context should be closed. For this to
work, a RemoteGUIManager needs to be exported, that is, it needs
to be accessible from remote machines.
| Modifier and Type | Method and Description |
|---|---|
java.net.URI[] |
getActivityStateListenerURIs(SessionToken session,
EBPInstanceReference activity)
Registers this GUI manager as state listener for the designated activity
and returns the URIs of the (local) notification service that needs to be
registered at the
SynchronousActivityStarting. |
GUIContext |
getLocalForRemoteGuiContext(SessionToken session,
de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext transfrdCtxt)
Gets an appropriate GUI context for the designated
TransferableGUIContext. |
getGUIContextgetLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, startactivityClosed, activityFailed, activityReset, activityResumed, activitySignalled, activitySuspended, activitySuspendedGUIContext getLocalForRemoteGuiContext(SessionToken session, de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext transfrdCtxt) throws GUIContextUnavailableException
TransferableGUIContext. The created context represents the
designated context locally and can be any arbitrary appropriate GUI
context. This can be the same GUI context provided by GUIManager
but usually the remote execution requires some special logic in the local
GUI context. session - The session which is used to check for access rights on this
method.transfrdCtxt - The GUI context retrieved from the component that is
executed remotely. This needs to be wrapped appropriately in a
local GUI context.RemoteGUIContext.
This can usually be ignored since the RemoteGUIManager
integrates the GUIContext in the local GUI and handles
closing it.GUIContextUnavailableException - If no GUI context can be created for
the designated TransferableGUIContext, a
GUIContextUnavailableException will be thrown.java.net.URI[] getActivityStateListenerURIs(SessionToken session, EBPInstanceReference activity) throws ServiceNotKnownException
SynchronousActivityStarting.session - The session which is used to check for access rights on this
method.activity - The activity for which to receive activity state
notifications.SynchronousActivityStarting.ServiceNotKnownException - If the notification service cannot be
retrieved, a ServiceNotKnownException will be
thrown.