Interface RemoteGUIManager
- All Superinterfaces:
ActivityStateNotification,ADEPT2Service,GUIManager
- All Known Implementing Classes:
AbstractGUIManager,NullGUIManager,RemoteHTMLGUIManager
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. A
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.
- Author:
- Ulrich Kreher
-
Method Summary
Modifier and TypeMethodDescriptionURI[]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 theSynchronousActivityStarting.getLocalForRemoteGuiContext(SessionToken session, de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext transfrdCtxt) Gets an appropriate GUI context for the designatedTransferableGUIContext.Methods inherited from interface de.aristaflow.adept2.core.runtimemanager.ActivityStateNotification
activityClosed, activityFailed, activityReset, activityResumed, activitySignalled, activitySuspended, activitySuspendedMethods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, startMethods inherited from interface de.aristaflow.adept2.core.runtimemanager.gui.GUIManager
getGUIContext
-
Method Details
-
getLocalForRemoteGuiContext
GUIContext getLocalForRemoteGuiContext(SessionToken session, de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext transfrdCtxt) throws GUIContextUnavailableException Gets an appropriate GUI context for the designatedTransferableGUIContext. The created context represents the designated context locally and can be any arbitrary appropriate GUI context. This can be the same GUI context provided byGUIManagerbut usually the remote execution requires some special logic in the local GUI context.
Applications using the GUI context should cast the returned instance to the appropriate implementation.- Parameters:
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.- Returns:
- The context containing the appropriate GUI for remotely execution
of the component of the designated
RemoteGUIContext. This can usually be ignored since theRemoteGUIManagerintegrates theGUIContextin the local GUI and handles closing it. - Throws:
GUIContextUnavailableException- If no GUI context can be created for the designatedTransferableGUIContext, aGUIContextUnavailableExceptionwill be thrown.
-
getActivityStateListenerURIs
URI[] getActivityStateListenerURIs(SessionToken session, EBPInstanceReference activity) throws ServiceNotKnownException 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 theSynchronousActivityStarting.- Parameters:
session- The session which is used to check for access rights on this method.activity- The activity for which to receive activity state notifications.- Returns:
- The URIs of the (local) notification service to be registered at
the
SynchronousActivityStarting. - Throws:
ServiceNotKnownException- If the notification service cannot be retrieved, aServiceNotKnownExceptionwill be thrown.
-