Class AbstractTransferableGUIContext

  • All Implemented Interfaces:
    Localiser, GUIContext, de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext, Closeable, Serializable, AutoCloseable
    Direct Known Subclasses:
    TransferredURLContext

    public class AbstractTransferableGUIContext
    extends Object
    implements de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
    A basic implementation for a TransferableGUIContext just enough to satisfy the interface. Subclasses should provide more information to allow for creating a local GUI context for a remote execution. This information also needs to be provided via getGUIContextAttributes() so subclasses should override this method.
    Author:
    Ulrich Kreher
    See Also:
    Serialized Form
    • Field Detail

      • activityInstance

        protected final ActivityInstance activityInstance
        The activity instance this GUI context has been created for.
      • locale

        protected final Locale locale
        The locale of the agent requesting this GUI context. This will be null if the activity instance should not be localised.
      • activity

        protected final EBPInstanceReference activity
        The EBPInstanceReference identifying the process instance node this GUI context has been created for.
      • sessionID

        protected final String sessionID
        The ID of the execution session this GUI context has been created for uniquely identifying the component execution on the (remote) runtime manager).
      • executionContext

        protected final ExecutionContext executionContext
        The execution context of the activity for which this GUI context has been created for.
      • transfrdGUIContextID

        protected final String transfrdGUIContextID
        The ID of transferred GUI context which may differ from that provided and requested by the activity instance.
    • Constructor Detail

      • AbstractTransferableGUIContext

        protected AbstractTransferableGUIContext​(ActivityInstance activityInstance,
                                                 EBPInstanceReference activity,
                                                 String sessionID,
                                                 ExecutionContext executionContext,
                                                 String transfrdGUIContextID)
        Creates a new instance of the base implementation of a TransferableGUIContext having the designated fields.
        Parameters:
        activityInstance - The activity instance this GUI context has been created for.
        activity - The EBPInstanceReference identifying the process instance node this GUI context has been created for.
        sessionID - The ID of the execution session this GUI context has been created for uniquely identifying the component execution on the (remote) runtime manager).
        executionContext - The execution context of the activity for which this GUI context has been created for.
        transfrdGUIContextID - The ID of transferred GUI context which may differ from that provided and requested by the activity instance.
      • AbstractTransferableGUIContext

        protected AbstractTransferableGUIContext​(AbstractTransferableGUIContext context)
        Creates a new instance of the base implementation of a TransferableGUIContext having the fields of the designated GUI context.
        Parameters:
        context - The GUI context from which to retrieve the fields.
    • Method Detail

      • getActivityInstance

        public ActivityInstance getActivityInstance()
        Specified by:
        getActivityInstance in interface de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
      • getLocale

        public Locale getLocale()
        Description copied from interface: Localiser
        Gets the Locale that should be used or that is used for localisation of this object or a related object.
        Specified by:
        getLocale in interface Localiser
        Returns:
        The Locale that should be used or that is used for localisation of this object or a related object.
      • getEBPInstanceReference

        public EBPInstanceReference getEBPInstanceReference()
        Specified by:
        getEBPInstanceReference in interface de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
      • getSessionID

        public String getSessionID()
        Specified by:
        getSessionID in interface de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
      • getExecutionContext

        public ExecutionContext getExecutionContext()
        Specified by:
        getExecutionContext in interface de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
      • getTransferredGUIContextID

        public String getTransferredGUIContextID()
        Specified by:
        getTransferredGUIContextID in interface de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
      • getGUIContextAttributes

        public Map<String,​String> getGUIContextAttributes()
        Always returns the empty map.
        Specified by:
        getGUIContextAttributes in interface de.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
      • close

        public void close()
        Closes the GUI for this context. This method has to be called by the runtime manager whenever an application has terminated (finished, failed, aborted, killed,...).
        It must be possible to call this method more than once, even if the GUIContext has already shut down. This especially applies to the disposal of SWT-widgets, that is, it is allowed to call this method after the disposal of the corresponding widgets. This is an empty implementation since subclasses are usually only used for transferring the GUI context from the executing runtime manager to the displaying client.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface GUIContext