Class AbstractTransferableGUIContext
- java.lang.Object
-
- de.aristaflow.adept2.ui.remotegui.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 aTransferableGUIContext
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 viagetGUIContextAttributes()
so subclasses should override this method.- Author:
- Ulrich Kreher
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected EBPInstanceReference
activity
TheEBPInstanceReference
identifying the process instance node this GUI context has been created for.protected ActivityInstance
activityInstance
The activity instance this GUI context has been created for.protected ExecutionContext
executionContext
The execution context of the activity for which this GUI context has been created for.protected Locale
locale
The locale of the agent requesting this GUI context.protected 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).protected String
transfrdGUIContextID
The ID of transferred GUI context which may differ from that provided and requested by the activity instance.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractTransferableGUIContext(ActivityInstance activityInstance, EBPInstanceReference activity, String sessionID, ExecutionContext executionContext, String transfrdGUIContextID)
Creates a new instance of the base implementation of aTransferableGUIContext
having the designated fields.protected
AbstractTransferableGUIContext(AbstractTransferableGUIContext context)
Creates a new instance of the base implementation of aTransferableGUIContext
having the fields of the designated GUI context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the GUI for this context.ActivityInstance
getActivityInstance()
EBPInstanceReference
getEBPInstanceReference()
ExecutionContext
getExecutionContext()
Map<String,String>
getGUIContextAttributes()
Always returns the empty map.Locale
getLocale()
Gets theLocale
that should be used or that is used for localisation of this object or a related object.String
getSessionID()
String
getTransferredGUIContextID()
-
-
-
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 benull
if the activity instance should not be localised.
-
activity
protected final EBPInstanceReference activity
TheEBPInstanceReference
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 aTransferableGUIContext
having the designated fields.- Parameters:
activityInstance
- The activity instance this GUI context has been created for.activity
- TheEBPInstanceReference
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 aTransferableGUIContext
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 interfacede.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
-
getLocale
public Locale getLocale()
Description copied from interface:Localiser
Gets theLocale
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 interfacede.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
-
getSessionID
public String getSessionID()
- Specified by:
getSessionID
in interfacede.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
-
getExecutionContext
public ExecutionContext getExecutionContext()
- Specified by:
getExecutionContext
in interfacede.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
-
getTransferredGUIContextID
public String getTransferredGUIContextID()
- Specified by:
getTransferredGUIContextID
in interfacede.aristaflow.adept2.model.runtimeenvironment.guicontext.TransferableGUIContext
-
getGUIContextAttributes
public Map<String,String> getGUIContextAttributes()
Always returns the empty map.- Specified by:
getGUIContextAttributes
in interfacede.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 interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceGUIContext
-
-