@ConfigurationDescription(properties={@Property(name="ExecutorPoolSize",type=INT,defaultValue="10",description="The amount of threads used for the shared executor service."),,,}) public abstract class MultiplexingClientService extends AbstractAuthenticatedService implements ADEPT2ClientService
MultiplexingClientService is a broker for service requests
from various web clients. It manages several client service, one client
service per user. A user-specific client service is created each time a user
logs on. All requests
for this user are then forwarded to the appropriate client service. However,
some methods of this multiplexing service are not user-specific but global.
This is stated in the documentation of these methods.
Implementations of this class need to map a user request (that is the current
thread) to a string representing the user request (for instance the session
ID of a HTTP-request or RAP). This can be achieved by registering the session
ID for the current string when retrieving the corresponding request and
deregistering it before finishing the request handling.
If the user session is not registered, most methods will throw an
IllegalStateException.
Note that implementations of this class need a public constructor accepting
a Configuration and a Registry.
AbstractADEPT2Service.ActiveSessions| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.locks.ReadWriteLock |
activeAgentLock
The lock for synchronising all access concerning the active agent, which is
mainly
sessionServiceMapping. |
protected java.util.Map<java.lang.String,ADEPT2ClientService> |
sessionServiceMapping
Mapping between a user-session-ID and an ADEPT2 client service.
|
CFG_EARLY_SERVICEAUTH_ORGPOSID, CFG_EARLY_SERVICEAUTH_ORGPOSNAME, CFG_EARLY_SERVICEAUTH_PASSWORD, CFG_EARLY_SERVICEAUTH_USERNAME, CFG_SERVICEAUTH_ORGPOSID, CFG_SERVICEAUTH_ORGPOSNAME, CFG_SERVICEAUTH_PASSWORD, CFG_SERVICEAUTH_USERNAMECONF_CSV_LOGGING, configuration, logger, registry, runtimeRequiredServices, startupRequiredServices| Constructor and Description |
|---|
MultiplexingClientService(Configuration configuration,
Registry registry)
Creates a MultiplexingClientService with the designated registry, a logger
for this and the designated required services.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActiveAgentListener(ClientService.ActiveAgentChangedListener listener)
Adds the listener to receive events when the active agent has been changed.
|
void |
addGUIListener(SelectedGUIElementChangedListener selectedElementChangedListener)
Registers a listener to be informed about a change in the currently
selected GUI element representing a model element.
|
boolean |
addServiceStateListener(ADEPT2Service service,
ClientService.ServiceStateListener listener)
Registers a listener to be informed about a change in the availability of
an
ADEPT2Service. |
RichAgent[] |
agentsChanged(QualifiedAgent... agents)
Signals this client service that the designated agents changed.
|
boolean |
connectAll()
Tries to connect this client service to all AristaFlow-services.
|
void |
disconnectAll()
Disconnects this client service from the AristaFlow-services.
|
RichAgent |
getActiveAgent()
Gets the currently active agent.
|
ActivityExecutionControl |
getActivityExecutionControl(EBPInstanceReference activity) |
ActivityModelFactory |
getActivityModelFactory()
CL_ARCH client service documentation
|
ActivityRepository |
getActivityRepository()
CL_ARCH client service documentation
|
ActivityStarting |
getActivityStarting(EBPInstanceReference activity)
Gets the interface for (asynchronous) start operations of the designated
activity independently from the execution manager holding the activity.
|
RichAgent[] |
getAuthenticatedAgents()
Gets all authenticated agents of this clients usually this is one agent
holding multiple organisational positions.
|
Authentication |
getAuthentication()
Gets the manager that handles authentication for the users of this client.
|
java.net.URI[] |
getAutoStartRuntimeManager()
Gets the URIs of the runtime manager for autostarting.
|
java.util.Locale[] |
getAvailableLocales()
Gets the locales the client supports, that is, the locales found as
resources.
|
ADEPT2ClientService |
getClientService()
Returns the ADEPT2ClientService which was mapped in
addClientService or null if none was found. |
ADEPT2ClientService |
getClientService(SessionToken session)
This method can be called to receive the
ADEPT2ClientService
which is mapped to the user session ID in the additionalAttributes of the
SessionToken. |
ADEPT2ClientService |
getClientServiceOrException()
Returns the ADEPT2ClientService which was mapped in
addClientService or throws an
IllegalStateException if no client session context is
available. |
java.lang.String |
getClusterName()
Gets the name of the cluster this service belongs to.
|
java.lang.String |
getComponentType(java.lang.String instanceName)
Returns the name of the component type of the designated component
instance as used in configuration files.
|
<T> T |
getConfiguredPlugin(SessionToken session,
java.lang.Object usingInstance,
java.lang.String pluginTypeName,
java.lang.Class<T> pluginType)
Retrieves the default plugin of the designated type which is configured for
the designated (using) instance.
|
<T> T |
getConfiguredPlugin(SessionToken session,
java.lang.Object usingInstance,
java.lang.String pluginTypeName,
java.lang.Class<T> pluginType,
java.lang.String pluginInstanceName)
Retrieves the plugin having the designated type and instance name as well
as type and which is configured for the designated (using) instance.
|
<T> java.util.Map<java.lang.String,T> |
getConfiguredPlugins(SessionToken session,
java.lang.Object usingInstance,
java.lang.String pluginTypeName,
java.lang.Class<T> pluginType)
Retrieves all plugin instances (pre-configured and dynamic) of the
designated plugin type.
|
java.lang.String |
getDefaultCharset()
Returns the default character set of this client as specified by
Charset.defaultCharset().name(). |
java.util.Locale |
getDefaultLocale()
Returns the default locale of this client as specified by
Locale.getDefault(). |
ExecutionControlManager |
getExecutionControlManager(EBPInstanceReference activity)
Gets the execution control manager for the designated activity.
|
ExecutionFactory |
getExecutionFactory() |
ExecutionHistory |
getExecutionHistory()
Gets the execution history.
|
ExecutionManager |
getExecutionManager() |
ExecutionManager |
getExecutionManagerForActivity(EBPInstanceReference ebpInstanceReference)
Returns a reference to the execution manager that is responsible for the
designated activity.
|
java.util.concurrent.ExecutorService |
getExecutorService()
Gets an
ExecutorService for executing long lasting tasks
asynchronously. |
FilterFactory |
getFilterFactory()
CL_ARCH client service documentation
|
java.lang.String |
getFormattedSignature(java.lang.Class<?>[] parameterTypes)
Helper method for getting a string describing the parameter types as method
signature for use in log messages and exceptions.
|
SystemDataFormatterFactory |
getFormatterFactory()
Gets the system data formatter factory.
|
GraphicalModelFactory |
getGraphicalModelFactory()
CL_ARCH client service documentation
|
GUIManager |
getGUIManager()
Gets the GUI manager responsible for synchronising the currently selected
element in the GUI.
|
java.lang.String |
getHierarchicalInstanceName(java.lang.String componentType,
java.lang.String simpleName)
Returns a hierarchical instance name containing the component type as well
as the instance name.
|
InitTabFactory |
getInitTabFactory() |
InitTabManager |
getInitTabManager() |
InstanceChanging |
getInstanceChanging()
Gets the interface for changing an instance.
|
InstanceControl |
getInstanceControl()
Gets the interface for controlling an instance.
|
java.lang.Class<?> |
getInterfaceForComponentType(java.lang.String componentType)
Returns the class object of the corresponding interface / superclass, if
the component type is declared.
|
java.lang.String |
getJavaVersion()
Returns the version of the running Java Virtual Machine of the client as
specified by
System.getProperty("java.version"). |
LicenceManager |
getLicenceManager()
Gets the licence manager that provides the licence for all
AristaFlow-services and products.
|
LocalisationFactory |
getLocalisationFactory()
Gets the localisation factory.
|
RichAgent[] |
getLoggedOnAgents()
Returns the agents that are currently logged on this client.
|
<T> T |
getModelFactory(java.lang.String modelFactoryName,
java.lang.Class<T> modelFactoryType)
Gets the designated model factory registry.
|
java.lang.Class<?> |
getModelViewerClass(java.lang.String pluginID)
Gets the model viewer class for the designated plugin ID that allows
type-save access to plugin data at model elements.
|
java.lang.String |
getOperatingSystemArchitecture()
Returns the architecture of the operating system of the client as specified
by
System.getProperty("os.arch"). |
java.lang.String |
getOperatingSystemName()
Returns the name of the operating system of the client as specified by
System.getProperty("os.name"). |
java.lang.String |
getOperatingSystemVersion()
Returns the version of the operating system of the client as specified by
System.getProperty("os.version"). |
OrgModelManager |
getOrgModelManager()
CL_ARCH client service documentation
|
ProcessCheckService |
getProcessChecks() |
ProcessImageRenderer |
getProcessImageRenderer() |
ProcessManager |
getProcessManager()
CL_ARCH client service documentation
|
ProcessManager |
getProcessManager(java.util.UUID instanceID)
CL_ARCH client service documentation
|
ProcessManager |
getProcessManagerForInstanceId(java.net.URI[] execMgr,
java.util.UUID instId)
Gets the process manager that is responsible for the instance with the designated (logical) ID
being executed on the designated execution manager.
|
ProcessManager |
getProcessManagerForInstanceId(java.util.UUID instId)
Gets the process manager that is responsible for the instance with the designated (logical) ID.
|
ProcessManager |
getProcessManagerForInstanceLogId(java.net.URI[] execMgr,
java.util.UUID instLogId)
Gets the process manager that is responsible for the instance with the designated (internal) ID
being executed on the designated execution manager.
|
ProcessModelFactory |
getProcessModelFactory()
CL_ARCH client service documentation
|
ProcessRepository |
getProcessRepository() |
RemoteGUIManager |
getRemoteGUIManager()
Gets the GUI manager for creating local GUI contexts for the GUI contexts
that are transferred from a remotely executed activity.
|
Pair<SynchronousActivityStarting,java.lang.Boolean> |
getRemoteSynchronousActivityStarting(EBPInstanceReference activity)
Gets the interface for (synchronous) start operations of the designated
activity independently from the execution manager holding the activity and
the local runtime manager.
|
RuntimeEnvironmentFactory |
getRuntimeEnvironmentFactory()
Gets the anonymous instance of the runtime environment factory using the
classloader of this registry.
|
RuntimeManager |
getRuntimeManager()
Gets the runtime manager for this client service, which is usually a local
runtime manager.
|
java.util.Map<RichAgent,java.net.URI[]> |
getRuntimeManagerURIs()
Returns the runtime managers that are currently available on this client.
|
RuntimeService |
getRuntimeService()
Gets the runtime service for this client service allowing to execute
activities directly by the caller and not in a runtime manager.
|
LoggingScheduledThreadPoolExecutor |
getScheduledExecutorService()
Gets a
ScheduledExecutorService for scheduling long lasting
tasks asynchronously. |
<T extends ADEPT2Service> |
getService(SessionToken session,
java.lang.String serviceName,
java.lang.Class<T> serviceType)
Returns the designated service which is either a local service or a service
stub that is retrieved from the global registry if the service is not known
to this registry but to the global registry.
|
<T extends ADEPT2Service> |
getService(SessionToken session,
java.net.URI[] serviceURIs,
java.lang.Class<T> serviceType)
Retrieves the service described by the URIs which is either a local service
stub that is retrieved from the global registry if the service is not known
to this registry but to the global registry.
|
<T extends ADEPT2Service> |
getServiceOfType(SessionToken session,
java.lang.String typeName,
java.lang.Class<T> serviceType)
Returns the service instance of the designated service type which is
configured for usage by this (the requesting) service instance.
|
SessionToken |
getSessionToken()
Gets a session token for currently active agent and the URIs of this
client.
|
SessionToken |
getSessionToken(java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Gets a session token for currently active agent and the URIs of this client
having the designated additional attributes.
|
SessionToken |
getSessionToken(QualifiedAgent agent)
Gets a session token for the designated agent ignoring the currently active
agent.
|
SessionToken |
getSessionToken(QualifiedAgent agent,
java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
Gets a session token for the designated agent ignoring the currently active
agent having the designated additional attributes.
|
java.lang.String |
getSimpleInstanceName(java.lang.String instanceName)
Returns the simple name of the designated component instance as used in
configuration files.
|
SynchronousActivityStarting |
getSynchronousActivityStarting(EBPInstanceReference activity)
Gets the interface for (synchronous) start operations of the designated
activity independently from the execution manager holding the activity.
|
UpdateManager |
getUpdateManager()
Gets the update manager which informs about changes in process objects.
|
java.util.Locale |
getUsedLocale(RichAgent agent)
Returns the locale which the designated agent has chosen on this client.
|
protected abstract java.lang.String |
getUserSessionID()
Gets the session identifying the current request.
|
WorklistManager |
getWorklistManager()
Gets the worklist manager for logging on and retrieving a worklist and
updates from.
|
WorklistModelFactory |
getWorklistModelFactory()
CL_ARCH client service documentation
|
void |
guiSelectionChanged(SelectedGUIElementChangedEvent selectionChangeEvent)
This method informs all interested
listeners
about a change in the currently selected graphical representation of a
model element, for instance, selecting an instance from a list of instances
or the GUI element that displays the user interface of a process step and
thus represents a (running) EBP-instance. |
void |
init(java.net.URI[] localExportedUris,
java.net.URI[] globalExportedUris)
Copies the designated URI array and stores it internally and authenticates
to the system and sets the session factory.
|
boolean |
isConnected(java.lang.String serviceName)
Returns whether this client is connected to the designated service or not.
|
void |
logoff()
Logs the agent (that is with all organisational positions) off and
invalidates the session factories.
|
void |
removeActiveAgentListener(ClientService.ActiveAgentChangedListener listener)
Removes the listener to receive events when the active agent has been
changed.
|
void |
removeGUIListener(SelectedGUIElementChangedListener selectedElementChangedListener)
Removes a listener from further notifications of the selected GUI element.
|
void |
removeServiceStateListener(ADEPT2Service service,
ClientService.ServiceStateListener listener)
Removes a listener from further notifications of the designated
ADEPT2Service. |
protected void |
removeSession(java.lang.String sessionID,
boolean emergency)
Removes the designated session that is the corresponding client service and
the GUI manager will be removed.
|
void |
serverReturned(java.lang.String serverName,
java.net.URI[] serverURIs)
Notifies this client (if it has not shutdown itself) that the designated
server is running again.
|
void |
serverShutdown(java.lang.String serverName,
java.net.URI[] serverURIs,
long shutdownTime,
long estimatedDowntime)
Notifies this client that the designated server will be down in the
designated period and for the estimated downtime.
|
void |
setActiveAgent(QualifiedAgent activeAgent)
Sets the currently active agent.
|
void |
setAuthenticatedAgents(ClientSessionFactory... csf)
Sets the client session factories for this service which provide the
session tokens for the using components.
|
void |
shutdown(boolean emergency)
Awaits the termination of the active sessions and nulls the session factory.
|
void |
start()
Method setting the status to the current time.
|
_sessionActive, authenticateService, awaitActiveSessions, createChildSession, createSession, getAgent, getSecurityManager, getSessionFactory, getStartupRequired, getTopLevelAgent, getUserCredentials, globalSecurityManagerAvailable, isEarlyService, sessionHasCapability_sessionFinished, activeOrInvalidServiceStateException, changeLogContext, changeLogContext, changeLogContext, consoleLog, csvLoggingEnabled, getClassSpecificJulLogger, getDependencyRegistry, getLocalUris, getLogger, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, isActive, isSessionActive, isShutdown, logMethodEntry, logMethodEntry, logMethodEntry, logMethodExit, logMethodExit, ping, preShutdown, privilegeSession, privilegeThread, revertLogContextChanges, sessionActive, sessionActive, sessionActive, sessionActive, sessionFinished, sessionFinished, signalShutdown, signalStart, unprivilegeThreadprotected final java.util.Map<java.lang.String,ADEPT2ClientService> sessionServiceMapping
protected final java.util.concurrent.locks.ReadWriteLock activeAgentLock
sessionServiceMapping.public MultiplexingClientService(Configuration configuration, Registry registry) throws ConfigurationException
configuration - The configuration providing the logon credentials for
this service.registry - The registry to be used for accessing services by this
service. This is provided as parameter to the constructor when
creating a service.ConfigurationException - If the password for this authenticated
service cannot be parsed from the configuration, a
ConfigurationException will be thrown.public void init(java.net.URI[] localExportedUris,
java.net.URI[] globalExportedUris)
throws AbortServiceException
AbstractAuthenticatedService
In case of an early service, this will not authenticate to the system! Such
a service need to AbstractAuthenticatedService.authenticateService() later when the security
manager is available.
init in interface ADEPT2Serviceinit in class AbstractAuthenticatedServicelocalExportedUris - The URIs with which this service is exported
locally or a local URI or an empty array for internal services.globalExportedUris - The URIs with which this service is published
globally or null in case the service is not
published.AbortServiceException - If authenticating at the security manager
fails, an AbortServiceException will be thrown.public void start()
throws AbortServiceException
AbstractADEPT2Servicestart in interface ADEPT2Servicestart in class AbstractADEPT2ServiceAbortServiceException - If this service cannot be started due to
a severe problem, an AbortServiceException will be
thrown. ADEPT2Service.shutdown(boolean) will not be called when aborting; the
service has to shut down itself/clean up before throwing the
exception.public void shutdown(boolean emergency)
AbstractAuthenticatedServiceshutdown in interface ADEPT2Serviceshutdown in class AbstractAuthenticatedServiceemergency - Whether the shutdown will be an emergency shutdown.public java.util.Locale[] getAvailableLocales()
getAvailableLocales in interface ClientServicepublic java.util.concurrent.ExecutorService getExecutorService()
ExecutorService for executing long lasting tasks
asynchronously. Please do not start own threads but use this executor
service instead otherwise the shutdown of the client will not work
correctly since the threads cannot be reached. However, if you do, you will
be responsible for terminating the threads correctly when shutting down. getExecutorService in interface ClientServiceExecutorService for executing long lasting task
asynchronously instead of creating own (local) threads.public LoggingScheduledThreadPoolExecutor getScheduledExecutorService()
ScheduledExecutorService for scheduling long lasting
tasks asynchronously. Please do not start own threads but use this executor
service instead otherwise the shutdown of the client will not work
correctly since the threads cannot be reached. However, if you do, you will
be responsible for terminating the threads correctly when shutting down. getScheduledExecutorService in interface ClientServiceScheduledExecutorService for scheduling long lasting
task asynchronously instead of creating own (local) threads.public boolean isConnected(java.lang.String serviceName)
ClientServiceClientService.connectAll() can be tried, but this need not be
successful. If the component could work offline, it should do so without
accessing any server logic. Otherwise the component would have to
terminate.isConnected in interface ClientServiceserviceName - The name of the service of which to check whether this
client service is connected to.public boolean connectAll()
ClientServiceconnectAll in interface ClientServicepublic void disconnectAll()
ClientServicedisconnectAll in interface ClientServicepublic boolean addServiceStateListener(ADEPT2Service service, ClientService.ServiceStateListener listener)
ClientServiceADEPT2Service.addServiceStateListener in interface ClientServiceservice - The service for which to be informed about its availability.listener - The instance which to notify in case the availability of
the designated service changes.public void removeServiceStateListener(ADEPT2Service service, ClientService.ServiceStateListener listener)
ClientServiceADEPT2Service.removeServiceStateListener in interface ClientServiceservice - The service for which to no longer be informed about its
availability.listener - The instance which to remove from availability
notifications.public void logoff()
null as active
agent.
This removes the GUI manager of the current user session and shuts down
and removes the corresponding client service.logoff in interface ClientServicepublic SessionToken getSessionToken()
ADEPT2ClientServicegetSessionToken in interface ADEPT2ClientServicegetSessionToken in interface ClientServiceClientSessionFactory.getSessionToken(URI[])public SessionToken getSessionToken(java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
ClientServicegetSessionToken in interface ClientServiceadditionalAttributes - Additional attributes which are provided by the
created session token. This may be null.ClientSessionFactory.getSessionToken(Map)public SessionToken getSessionToken(QualifiedAgent agent)
ClientServiceIllegalArgumentException will be thrown.getSessionToken in interface ClientServiceagent - The agent to retrieve a session token for.public SessionToken getSessionToken(QualifiedAgent agent, java.util.Map<java.lang.String,java.lang.String> additionalAttributes)
ClientServiceIllegalArgumentException will be thrown.getSessionToken in interface ClientServiceagent - The agent to retrieve a session token for.additionalAttributes - Additional attributes which are provided by the
created session token. This may be null.public FilterFactory getFilterFactory()
ADEPT2ClientServicegetFilterFactory in interface ADEPT2ClientServicegetFilterFactory in interface ClientServicepublic LocalisationFactory getLocalisationFactory()
ClientServicegetLocalisationFactory in interface ClientServicepublic SystemDataFormatterFactory getFormatterFactory()
ClientServicegetFormatterFactory in interface ClientServicepublic GraphicalModelFactory getGraphicalModelFactory()
ADEPT2ClientServicegetGraphicalModelFactory in interface ADEPT2ClientServicepublic InitTabFactory getInitTabFactory()
getInitTabFactory in interface AdministrationServicepublic void setAuthenticatedAgents(ClientSessionFactory... csf)
Authentication.authenticate(String, long, String)).
This method is client-session-specific. When setting the agents, a new
client service will be created for the current user session and stored
internally. All further user-session-specific calls to this service will be
forwarded to this client service. Authentication.setAuthenticatedAgents in interface ClientServicecsf - The client session factories provided when
authenticating.public RichAgent[] agentsChanged(QualifiedAgent... agents)
ClientServiceagentsChanged in interface ClientServiceagents - The agents that have changed on the server.public RichAgent[] getAuthenticatedAgents()
ADEPT2ClientServicegetAuthenticatedAgents in interface ADEPT2ClientServicegetAuthenticatedAgents in interface ClientServicepublic RichAgent getActiveAgent()
ADEPT2ClientServicegetActiveAgent in interface ADEPT2ClientServicegetActiveAgent in interface ClientServiceClientSessionFactory.getAuthenticatedAgent()public void setActiveAgent(QualifiedAgent activeAgent)
ClientServicelisteners will be notified
(asynchronously) about this.setActiveAgent in interface ClientServiceactiveAgent - The currently active agent, this must not be null.public void addActiveAgentListener(ClientService.ActiveAgentChangedListener listener)
ClientServiceaddActiveAgentListener in interface ClientServicelistener - The listener to receive events when the active agent has
been changed.public void removeActiveAgentListener(ClientService.ActiveAgentChangedListener listener)
ClientServiceremoveActiveAgentListener in interface ClientServicelistener - The active agent listener to remove.public void guiSelectionChanged(SelectedGUIElementChangedEvent selectionChangeEvent)
ClientServicelisteners
about a change in the currently selected graphical representation of a
model element, for instance, selecting an instance from a list of instances
or the GUI element that displays the user interface of a process step and
thus represents a (running) EBP-instance.
Implementations for the GUI element tracking should respect the order in which events are retrieved. Otherwise it may happen that some UI elements display an old event which has been signalled after a newer event.
guiSelectionChanged in interface ClientServiceselectionChangeEvent - The event containing information like the
selected element as well as the source of the event.public void addGUIListener(SelectedGUIElementChangedListener selectedElementChangedListener)
ClientServiceaddGUIListener in interface ClientServiceselectedElementChangedListener - The listener to be informed about a
change in the currently selected GUI element representing a model
element.public void removeGUIListener(SelectedGUIElementChangedListener selectedElementChangedListener)
ClientServiceremoveGUIListener in interface ClientServiceselectedElementChangedListener - The listener not to be informed any
more about GUI selection changes.public UpdateManager getUpdateManager()
ADEPT2ClientServicegetUpdateManager in interface ADEPT2ClientServicegetUpdateManager in interface AdministrationServicegetUpdateManager in interface ModellingClientServicepublic Authentication getAuthentication()
ClientServicegetAuthentication in interface ClientServicepublic LicenceManager getLicenceManager() throws ServiceNotKnownException
getLicenceManager in interface ClientServiceServiceNotKnownException - If there are problems retrieving the
licence manager, a ServiceNotKnownException will be
thrown.public java.lang.String getClusterName()
ClientServicegetClusterName in interface ClientServicepublic ActivityModelFactory getActivityModelFactory()
ADEPT2ClientServicegetActivityModelFactory in interface ActivityManagerServicegetActivityModelFactory in interface ADEPT2ClientServicepublic ProcessModelFactory getProcessModelFactory()
ADEPT2ClientServicegetProcessModelFactory in interface ActivityManagerServicegetProcessModelFactory in interface ADEPT2ClientServicegetProcessModelFactory in interface AdministrationServicegetProcessModelFactory in interface LocalExecutionClientServicegetProcessModelFactory in interface ModellingClientServicepublic ExecutionFactory getExecutionFactory()
getExecutionFactory in interface WorklistClientServicepublic WorklistModelFactory getWorklistModelFactory()
WorklistClientServicegetWorklistModelFactory in interface WorklistClientServicepublic ProcessCheckService getProcessChecks()
getProcessChecks in interface ADEPT2ClientServicegetProcessChecks in interface ModellingClientServicepublic ActivityRepository getActivityRepository()
ADEPT2ClientServicegetActivityRepository in interface ActivityManagerServicegetActivityRepository in interface ADEPT2ClientServicepublic ProcessManager getProcessManager()
ADEPT2ClientServicegetProcessManager in interface ADEPT2ClientServicegetProcessManager in interface AdministrationServicegetProcessManager in interface ModellingClientServicepublic ProcessImageRenderer getProcessImageRenderer()
getProcessImageRenderer in interface ADEPT2ClientServicegetProcessImageRenderer in interface AdministrationServicegetProcessImageRenderer in interface LocalExecutionClientServicepublic ProcessManager getProcessManager(java.util.UUID instanceID)
AdministrationServicegetProcessManager in interface AdministrationServicegetProcessManager in interface WorklistClientServicepublic ProcessRepository getProcessRepository()
getProcessRepository in interface AdministrationServicepublic OrgModelManager getOrgModelManager()
ADEPT2ClientServicegetOrgModelManager in interface ActivityManagerServicegetOrgModelManager in interface ADEPT2ClientServicegetOrgModelManager in interface AdministrationServicegetOrgModelManager in interface WorklistClientServicepublic ExecutionManager getExecutionManager()
getExecutionManager in interface ADEPT2ClientServicegetExecutionManager in interface AdministrationServicepublic ExecutionManager getExecutionManagerForActivity(EBPInstanceReference ebpInstanceReference)
LocalExecutionClientServicegetExecutionManagerForActivity in interface LocalExecutionClientServiceebpInstanceReference - identifies the activitypublic ProcessManager getProcessManagerForInstanceId(java.util.UUID instId)
LocalExecutionClientServicegetProcessManagerForInstanceId in interface LocalExecutionClientServiceinstId - The (logical) ID of the instance for which to retrieve the corresponding process
manager. This is resolved using the default execution manager.null in case it
could not be retrieved.public ProcessManager getProcessManagerForInstanceId(java.net.URI[] execMgr, java.util.UUID instId)
LocalExecutionClientServicegetProcessManagerForInstanceId in interface LocalExecutionClientServiceexecMgr - The URIs of the execution manager executing the instance with the designated ID.instId - The (logical) ID of the instance for which to retrieve the corresponding process
manager. This is resolved using the designated execution manager.null in case it
could not be retrieved (or the corresponding execution manager).public ProcessManager getProcessManagerForInstanceLogId(java.net.URI[] execMgr, java.util.UUID instLogId)
LocalExecutionClientServicegetProcessManagerForInstanceLogId in interface LocalExecutionClientServiceexecMgr - The URIs of the execution manager executing the instance with the designated ID.instLogId - The (internal) ID of the instance for which to retrieve the corresponding
process manager. This is resolved using the designated execution manager.null in case it
could not be retrieved (or the corresponding execution manager).public InstanceControl getInstanceControl()
ADEPT2ClientServicegetExecutionManager().getInstanceControl(). It may only be
called when online.getInstanceControl in interface ADEPT2ClientServicegetInstanceControl in interface AdministrationServicegetInstanceControl in interface WorklistClientServiceExecutionManager.getInstanceControl()public ActivityExecutionControl getActivityExecutionControl(EBPInstanceReference activity)
getActivityExecutionControl in interface AdministrationServicepublic ActivityStarting getActivityStarting(EBPInstanceReference activity)
LocalExecutionClientServicegetExecutionManager().getActivityStarting() except that the
returned interface also sets the appropriate
RuntimeManager-URIs.
It may only be called when online.getActivityStarting in interface LocalExecutionClientServicegetActivityStarting in interface WorklistClientServiceactivity - The activity for which to retrieve the corresponding
(asynchronous) start interface of the appropriate execution
manager.ExecutionManager.getActivityStarting()public Pair<SynchronousActivityStarting,java.lang.Boolean> getRemoteSynchronousActivityStarting(EBPInstanceReference activity) throws ServiceNotKnownException
ExecutionClientServiceLocalExecutionClientService.getSynchronousActivityStarting(EBPInstanceReference) but allows
implementations to choose a specific runtime manager. For instance it may
be desired to execute all HTML-activities on a specific central runtime
manager. getRuntimeManager().getSynchronousActivityStarting() for a
specific runtime manager. It may only be called when online.
This method needs not be implemented and may return null! In this case use
LocalExecutionClientService.getActivityStarting(EBPInstanceReference).
getRemoteSynchronousActivityStarting in interface ExecutionClientServicegetRemoteSynchronousActivityStarting in interface RemoteExecutionClientServiceactivity - The activity for which to retrieve the corresponding
(synchronous) start interface of the appropriate runtime manager.ServiceNotKnownException - If the runtime manager for the designated
activity cannot be retrieved, a
ServiceNotKnownException will be thrown.RuntimeManager.getSynchronousActivityStarting()public SynchronousActivityStarting getSynchronousActivityStarting(EBPInstanceReference activity)
LocalExecutionClientServicegetRuntimeManager().getSynchronousActivityStarting(). It
may only be called when online.
This method needs not be implemented and may return null! In this case use
LocalExecutionClientService.getActivityStarting(EBPInstanceReference).
getSynchronousActivityStarting in interface LocalExecutionClientServicegetSynchronousActivityStarting in interface WorklistClientServiceactivity - The activity for which to retrieve the corresponding
(synchronous) start interface of the appropriate runtime manager.RuntimeManager.getSynchronousActivityStarting()public RemoteGUIManager getRemoteGUIManager() throws ServiceNotKnownException
ExecutionClientServicegetRemoteGUIManager in interface ExecutionClientServicegetRemoteGUIManager in interface RemoteExecutionClientServiceServiceNotKnownException - If no remote GUI manager is available for
this client, a ServicNotKnownException will be
thrown. Usually this indicates a wrong configuration or the
normal GUI manager of this client being unable to provide such
local GUI contexts for remotely executed activities.public InstanceChanging getInstanceChanging()
ADEPT2ClientServicegetExecutionManager().getInstanceChanging(). It may only be
called when online.getInstanceChanging in interface ADEPT2ClientServiceExecutionManager.getInstanceChanging()public ExecutionHistory getExecutionHistory()
LocalExecutionClientServiceFIXME: the execution history is actually specific to a process manager, i.e. each p.m. can have its own execution history.
getExecutionHistory in interface LocalExecutionClientServicepublic InitTabManager getInitTabManager()
getInitTabManager in interface AdministrationServicepublic WorklistManager getWorklistManager()
WorklistClientServicegetWorklistManager in interface WorklistClientServicepublic RuntimeEnvironmentFactory getRuntimeEnvironmentFactory()
LocalExecutionClientServicegetRuntimeEnvironmentFactory in interface LocalExecutionClientServicepublic RuntimeService getRuntimeService()
LocalExecutionClientServicegetRuntimeService in interface LocalExecutionClientServicegetRuntimeService in interface WorklistClientServicepublic RuntimeManager getRuntimeManager()
WorklistClientServicegetRuntimeManager in interface WorklistClientServicepublic java.net.URI[] getAutoStartRuntimeManager()
LocalExecutionClientServicegetAutoStartRuntimeManager in interface LocalExecutionClientServicegetAutoStartRuntimeManager in interface WorklistClientServicepublic ExecutionControlManager getExecutionControlManager(EBPInstanceReference activity)
LocalExecutionClientServicegetExecutionControlManager in interface LocalExecutionClientServicegetExecutionControlManager in interface WorklistClientServiceactivity - The activity for which to retrieve the execution control
manager of the appropriate runtime manager.RuntimeManager.getExecutionControlManager()public GUIManager getGUIManager()
LocalExecutionClientServicegetGUIManager in interface LocalExecutionClientServicepublic java.lang.Class<?> getModelViewerClass(java.lang.String pluginID)
null will be
returned. This ID usually equals the ID of the (service-) plugin that uses
the model viewer.
This method is not user-session-specific and retrieves the designated
service globally.getModelViewerClass in interface ADEPT2ClientServicegetModelViewerClass in interface ModelViewerProviderpluginID - The ID of the plugin for which to retrieve a model viewer,
this ID is usually the same ID as the one of the (service-) plugin
using the plugin data.null in case there is no model viewer for the
designated plugin ID configured.public <T> T getModelFactory(java.lang.String modelFactoryName,
java.lang.Class<T> modelFactoryType)
throws ServiceNotKnownException
getModelFactory in interface ServiceAccessT - The type of the requested model factory registry.modelFactoryName - The name of the requested model factory. Use the
names declared in
ModelRegistryConstants. No
other model factory registries need to exist.modelFactoryType - The type of the requested model factory registry.ServiceNotKnownException - If
ServiceNotKnownException wrapping a
ConfigurationException will be thrown.public <T extends ADEPT2Service> T getServiceOfType(SessionToken session, java.lang.String typeName, java.lang.Class<T> serviceType) throws ServiceNotKnownException
getServiceOfType in interface ServiceAccessT - The type which the requested service is expected to be of. This
is a subtype of ADEPT2Service and either the
registered service type or a super type hereof.session - The session which is used to check for access rights on this
method.typeName - The type name of the requested service. Refer to
ComponentTypes and
BaseConstants for valid
predefined service type names. Other service type names are also
valid if the corresponding services are configured appropriately.
ADEPT2Service and the interface configured for the
service type or a super type hereof.serviceType - The type of the requested service. This is a subtype of
ADEPT2Service and the interface configured for the
service type or a super type hereof.ServiceNotKnownException - If
ADEPT2Service
-interface appropriately,ServiceNotKnownException will be thrown. This may
encapsulate a ConfigurationException or an
AbortServiceException.public <T> T getConfiguredPlugin(SessionToken session, java.lang.Object usingInstance, java.lang.String pluginTypeName, java.lang.Class<T> pluginType) throws ServiceNotKnownException
ServiceAccess.getConfiguredPlugin(SessionToken, Object, String, Class, String)
except that the default plugin instance is used, that is the first
configured one. Therefore this will not be a runtime plugin.
This method is not user-session-specific and retrieves the designated
plugin globally.getConfiguredPlugin in interface ServiceAccessT - The type of the requested plugin.session - The session which is used to check for access rights on this
method.usingInstance - The instance which is using the plugin and which is
provided in to the plugin when creating it. This allows the plugin
to access the instance it extends.pluginTypeName - The component type of the plugin instance to be
retrieved for usage. This may neither be null nor the empty
string. The type name is specified in the configuration.pluginType - The type of the requested plugin.ServiceNotKnownException - If
ServiceNotKnownException wrapping a
ConfigurationException will be thrown.public <T> java.util.Map<java.lang.String,T> getConfiguredPlugins(SessionToken session, java.lang.Object usingInstance, java.lang.String pluginTypeName, java.lang.Class<T> pluginType) throws ServiceNotKnownException
getConfiguredPlugins in interface ServiceAccessT - The plugin type of the requested instances.session - The session which is used to check for access rights on this
method.usingInstance - The instance which is using the plugins and which is
provided to the plugins when creating them. This allows the
plugins to access the instance it extends.pluginTypeName - The component type of the plugin instance to be
retrieved for usage. This may neither be null nor the empty
string. The type name is specified in the configuration.pluginType - The type of the requested plugin.ServiceNotKnownException - If
ServiceNotKnownException wrapping a
ConfigurationException will be thrown.public <T> T getConfiguredPlugin(SessionToken session, java.lang.Object usingInstance, java.lang.String pluginTypeName, java.lang.Class<T> pluginType, java.lang.String pluginInstanceName) throws ServiceNotKnownException
getConfiguredPlugin in interface ServiceAccessT - The type of the requested plugin.session - The session which is used to check for access rights on this
method.usingInstance - The instance which is using the plugin and which is
provided in to the plugin when creating it. This allows the plugin
to access the instance it extends.pluginTypeName - The component type of the plugin instance to be
retrieved for usage. This may neither be null nor the empty
string. The type name is specified in the configuration.pluginType - The type of the requested plugin.pluginInstanceName - The simple name of the plugin instance to
retrieve. This is either configured in the server/client
configuration or in a configuration found at runtime.ServiceNotKnownException - If
ServiceNotKnownException wrapping a
ConfigurationException will be thrown.public <T extends ADEPT2Service> T getService(SessionToken session, java.lang.String serviceName, java.lang.Class<T> serviceType) throws ServiceNotKnownException
getService in interface ServiceAccessT - The type of the requested service. This is a subtype of
ADEPT2Service and either interface configured for the
service type or a super type hereof.session - The session which is used to check for access rights on this
method.serviceName - The hierarchical instance name of the service.serviceType - The type of the requested service. This is a subtype of
ADEPT2Service and the interface configured for the
service type or a super type hereof.ServiceNotKnownException - If
ADEPT2Service
-interface appropriately,ServiceNotKnownException will be thrown. This may
encapsulate a ConfigurationException or an
AbortServiceException.public <T extends ADEPT2Service> T getService(SessionToken session, java.net.URI[] serviceURIs, java.lang.Class<T> serviceType) throws ServiceNotKnownException
getService in interface ServiceAccessT - The type of the requested service. This is a subtype of
ADEPT2Service and either interface configured for the
service type or a super type hereof.session - The session which is used to check for access rights on this
method.serviceURIs - The URIs of the service to be retrieved, the array has
to contain at least one valid service URI.serviceType - The type of the requested service. This is a subtype of
ADEPT2Service and the interface configured for the
service type or a super type hereof.ServiceNotKnownException - If
ADEPT2Service
-interface appropriately,ServiceNotKnownException will be thrown. This may
encapsulate a ConfigurationException or an
AbortServiceException.public java.lang.String getHierarchicalInstanceName(java.lang.String componentType,
java.lang.String simpleName)
/ProcessManager/PM1.
This method is not user-session-specific and retrieves the designated
service globally.getHierarchicalInstanceName in interface NameResolutioncomponentType - The type of the component to create the hierarchical
name for.simpleName - The simple name of the component instance as defined in
the configuration.public java.lang.String getSimpleInstanceName(java.lang.String instanceName)
getSimpleInstanceName in interface NameResolutioninstanceName - The hierarchical name of a component instance.public java.lang.String getComponentType(java.lang.String instanceName)
getComponentType in interface NameResolutioninstanceName - The hierarchical name of a component instance.public java.lang.String getFormattedSignature(java.lang.Class<?>[] parameterTypes)
getFormattedSignature in interface NameResolutionparameterTypes - All the parameter types of a method as instances of
Class.public java.lang.Class<?> getInterfaceForComponentType(java.lang.String componentType)
throws ConfigurationException
ConfigurationException. This method must not to be called
by clients; it is only for the registry and the communication framework.
This method is not user-session-specific and retrieves the designated
service globally.getInterfaceForComponentType in interface ServiceAccesscomponentType - The name of the component type of which to retrieve
the configured interface.ConfigurationException - If the designated component type is not
configured for this registry, a
ConfigurationException will be thrown.public ADEPT2ClientService getClientServiceOrException()
addClientService or throws an
IllegalStateException if no client session context is
available.java.lang.IllegalStateException - If there is no client service found, an
IllegalStateException will be thrown.public ADEPT2ClientService getClientService()
addClientService or null if none was found.InvalidServiceStateException - If no user session ID is registered
(e. g. for the current thread), an
InvalidServiceStateException will be thrown.public ADEPT2ClientService getClientService(SessionToken session)
ADEPT2ClientService
which is mapped to the user session ID in the additionalAttributes of the
SessionToken.session - A session token containing the user session ID as an
additional attribute.ServiceAccessControlException - If the agent cannot be determined
from the designated session token, a
ServiceAccessControlException will be thrown.InvalidServiceStateException - If the agent of the designated session
token does not have a valid user session ID or there is no client
service due to the client session factories not being set
properly, an InvalidServiceStateException will be
thrown.protected void removeSession(java.lang.String sessionID,
boolean emergency)
sessionID - The session ID of which to remove the client service and
the GUI manager.emergency - Whether the client service should be terminated quickly.protected abstract java.lang.String getUserSessionID()
null
in case the current user session cannot be determined.public java.lang.String getOperatingSystemName()
RemoteClientSystem.getProperty("os.name").getOperatingSystemName in interface RemoteClientSystem.getProperty("os.name").public java.lang.String getOperatingSystemVersion()
RemoteClientSystem.getProperty("os.version").getOperatingSystemVersion in interface RemoteClientSystem.getProperty("os.version").public java.lang.String getOperatingSystemArchitecture()
RemoteClientSystem.getProperty("os.arch").getOperatingSystemArchitecture in interface RemoteClientSystem.getProperty("os.arch").public java.lang.String getJavaVersion()
RemoteClientSystem.getProperty("java.version").getJavaVersion in interface RemoteClientSystem.getProperty("java.version").public java.util.Locale getUsedLocale(RichAgent agent)
locale of the agent is used.
This returns the locale of the first client service found for the
designated agent. However, note that this agent may be logged on several
times with different locales.getUsedLocale in interface RemoteClientagent - The agent for whom to retrieve the configured language.null in case the designated agent is not logged on.public java.util.Locale getDefaultLocale()
RemoteClientLocale.getDefault().getDefaultLocale in interface RemoteClientLocale.getDefault().public java.lang.String getDefaultCharset()
RemoteClientCharset.defaultCharset().name().getDefaultCharset in interface RemoteClientCharset.defaultCharset().name().public RichAgent[] getLoggedOnAgents()
RemoteClientgetLoggedOnAgents in interface RemoteClientpublic java.util.Map<RichAgent,java.net.URI[]> getRuntimeManagerURIs()
RemoteClientgetRuntimeManagerURIs in interface RemoteClientpublic void serverShutdown(java.lang.String serverName,
java.net.URI[] serverURIs,
long shutdownTime,
long estimatedDowntime)
RemoteClientserverShutdown in interface RemoteClientserverName - The logical name of the server to identify the return of
the server.serverURIs - The URIs of the server which is shutdown and which are
invalidshutdownTime - The time period when the server will be shut down.
Until then it still accepts requests, for instance to allow
clients to logoff.estimatedDowntime - The estimated duration for the downtime of the
designated server.RemoteClient.serverReturned(String, URI[])public void serverReturned(java.lang.String serverName,
java.net.URI[] serverURIs)
RemoteClientserverReturned in interface RemoteClientserverName - The logical name of the server to identify the
corresponding shutdown.serverURIs - The (new) URIs of the server which should be used from
now on.