Class MultiplexingClientService
- java.lang.Object
-
- de.aristaflow.adept2.base.service.AbstractADEPT2Service
-
- de.aristaflow.adept2.base.service.AbstractAuthenticatedService
-
- de.aristaflow.adept2.core.client.MultiplexingClientService
-
- All Implemented Interfaces:
ADEPT2Service,AuthenticatingService,LogService,NameResolution,ServiceAccess,ServiceThreadHandling,CapabilityChecker,ActivityManagerService,ADEPT2ClientService,AdministrationService,ClientService,ExecutionClientService,LocalExecutionClientService,ModellingClientService,RemoteClient,RemoteExecutionClientService,WorklistClientService,ModelViewerProvider
@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
TheMultiplexingClientServiceis 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 userlogs 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 anIllegalStateException.
Note that implementations of this class need a public constructor accepting aConfigurationand aRegistry.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.aristaflow.adept2.base.service.AbstractADEPT2Service
AbstractADEPT2Service.ActiveSessions
-
Nested classes/interfaces inherited from interface de.aristaflow.adept2.core.client.ClientService
ClientService.ActiveAgentChangedListener, ClientService.ServiceStateListener
-
-
Field Summary
Fields Modifier and Type Field Description protected ReadWriteLockactiveAgentLockThe lock for synchronising all access concerning the active agent, which is mainlysessionServiceMapping.protected Map<String,ADEPT2ClientService>sessionServiceMappingMapping between a user-session-ID and an ADEPT2 client service.-
Fields inherited from class de.aristaflow.adept2.base.service.AbstractAuthenticatedService
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_USERNAME
-
Fields inherited from class de.aristaflow.adept2.base.service.AbstractADEPT2Service
CONF_CSV_LOGGING, configuration, logger, registry, runtimeRequiredServices, startupRequiredServices
-
-
Constructor Summary
Constructors Constructor Description MultiplexingClientService(org.apache.commons.configuration2.Configuration configuration, Registry registry)Creates a MultiplexingClientService with the designated registry, a logger for this and the designated required services.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddActiveAgentListener(ClientService.ActiveAgentChangedListener listener)Adds the listener to receive events when the active agent has been changed.voidaddGUIListener(SelectedGUIElementChangedListener selectedElementChangedListener)Registers a listener to be informed about a change in the currently selected GUI element representing a model element.booleanaddServiceStateListener(ADEPT2Service service, ClientService.ServiceStateListener listener)Registers a listener to be informed about a change in the availability of anADEPT2Service.RichAgent[]agentsChanged(QualifiedAgent... agents)Signals this client service that the designated agents changed.booleanconnectAll()Tries to connect this client service to all AristaFlow-services.voiddisconnectAll()Disconnects this client service from the AristaFlow-services.RichAgentgetActiveAgent()Gets the currently active agent.ClientSessionFactorygetActiveClientSessionFactory()Gets the client session factory of the currently active agent.ActivityExecutionControlgetActivityExecutionControl(EBPInstanceReference activity)ActivityModelFactorygetActivityModelFactory()CL_ARCH client service documentationActivityRepositorygetActivityRepository()CL_ARCH client service documentationActivityStartinggetActivityStarting(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.AuthenticationgetAuthentication()Gets the manager that handles authentication for the users of this client.URI[]getAutoStartRuntimeManager()Gets the URIs of the runtime manager for autostarting.Locale[]getAvailableLocales()Gets the locales the client supports, that is, the locales found as resources.ADEPT2ClientServicegetClientService()Returns the ADEPT2ClientService which was mapped inaddClientServiceornullif none was found.ADEPT2ClientServicegetClientService(SessionToken session)This method can be called to receive theADEPT2ClientServicewhich is mapped to the user session ID in the additionalAttributes of the SessionToken.ADEPT2ClientServicegetClientServiceOrException()Returns the ADEPT2ClientService which was mapped inaddClientServiceor throws anIllegalStateExceptionif no client session context is available.StringgetClusterName()Gets the name of the cluster this service belongs to.StringgetComponentType(String instanceName)Returns the name of the component type of the designated component instance as used in configuration files.<T> TgetConfiguredPlugin(SessionToken session, Object usingInstance, String pluginTypeName, Class<T> pluginType)Retrieves the default plugin of the designated type which is configured for the designated (using) instance.<T> TgetConfiguredPlugin(SessionToken session, Object usingInstance, String pluginTypeName, Class<T> pluginType, 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> Map<String,T>getConfiguredPlugins(SessionToken session, Object usingInstance, String pluginTypeName, Class<T> pluginType)Retrieves all plugin instances (pre-configured and dynamic) of the designated plugin type.Map<String,Class<?>>getConfiguredPluginTypes(SessionToken session)Retrieves all plugin types declared for the instance using this interface.StringgetDefaultCharset()Returns the default character set of this client as specified byCharset.defaultCharset().name().LocalegetDefaultLocale()Returns the default locale of this client as specified byLocale.getDefault().ExecutionControlManagergetExecutionControlManager(EBPInstanceReference activity)Gets the execution control manager for the designated activity.ExecutionFactorygetExecutionFactory()ExecutionHistorygetExecutionHistory()Gets the execution history.ExecutionManagergetExecutionManager()ExecutionManagergetExecutionManagerForActivity(EBPInstanceReference ebpInstanceReference)Returns a reference to the execution manager that is responsible for the designated activity.ExecutorServicegetExecutorService()Gets anExecutorServicefor executing long lasting tasks asynchronously.FilterFactorygetFilterFactory()CL_ARCH client service documentationStringgetFormattedSignature(Class<?>[] parameterTypes)Helper method for getting a string describing the parameter types as method signature for use in log messages and exceptions.SystemDataFormatterFactorygetFormatterFactory()Gets the system data formatter factory.GraphicalModelFactorygetGraphicalModelFactory()CL_ARCH client service documentationGUIManagergetGUIManager()Gets the GUI manager responsible for synchronising the currently selected element in the GUI.StringgetHierarchicalInstanceName(String componentType, String simpleName)Returns a hierarchical instance name containing the component type as well as the instance name.InitTabFactorygetInitTabFactory()InitTabManagergetInitTabManager()InstanceChanginggetInstanceChanging()Gets the interface for changing an instance.InstanceControlgetInstanceControl()Gets the interface for controlling an instance.Class<?>getInterfaceForComponentType(String componentType)Returns the class object of the corresponding interface / superclass, if the component type is declared.StringgetJavaVersion()Returns the version of the running Java Virtual Machine of the client as specified bySystem.getProperty("java.version").LicenceManagergetLicenceManager()Gets the licence manager that provides the licence for all AristaFlow-services and products.LocalisationFactorygetLocalisationFactory()Gets the localisation factory.RichAgent[]getLoggedOnAgents()Returns the agents that are currently logged on this client.<T> TgetModelFactory(String modelFactoryName, Class<T> modelFactoryType)Gets the designated model factory registry.Class<?>getModelViewerClass(String pluginID)Gets the model viewer class for the designated plugin ID that allows type-save access to plugin data at model elements.Pair<String,String>getNames(String instanceName)Gets the component type name and the simple instance name of the designated component instance at once.StringgetOperatingSystemArchitecture()Returns the architecture of the operating system of the client as specified bySystem.getProperty("os.arch").StringgetOperatingSystemName()Returns the name of the operating system of the client as specified bySystem.getProperty("os.name").StringgetOperatingSystemVersion()Returns the version of the operating system of the client as specified bySystem.getProperty("os.version").OrgModelManagergetOrgModelManager()CL_ARCH client service documentationProcessCheckServicegetProcessChecks()ProcessImageRenderergetProcessImageRenderer()ProcessManagergetProcessManager()CL_ARCH client service documentationProcessManagergetProcessManager(UUID instanceID)CL_ARCH client service documentationProcessManagergetProcessManagerForInstanceId(URI[] execMgr, UUID instId)Gets the process manager that is responsible for the instance with the designated (logical) ID being executed on the designated execution manager.ProcessManagergetProcessManagerForInstanceId(UUID instId)Gets the process manager that is responsible for the instance with the designated (logical) ID.ProcessManagergetProcessManagerForInstanceLogId(URI[] execMgr, UUID instLogId)Gets the process manager that is responsible for the instance with the designated (internal) ID being executed on the designated execution manager.ProcessModelFactorygetProcessModelFactory()CL_ARCH client service documentationProcessRepositorygetProcessRepository()RemoteGUIManagergetRemoteGUIManager()Gets the GUI manager for creating local GUI contexts for the GUI contexts that are transferred from a remotely executed activity.Pair<SynchronousActivityStarting,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.de.aristaflow.adept2.core.resmodelmanager.ResModelExplorergetResModelExplorer()de.aristaflow.adept2.core.resmodelmanager.ResModelManagergetResModelManager()de.aristaflow.adept2.model.resourcemodel.builder.ResourceModelFactorygetResourceModelFactory()RuntimeEnvironmentFactorygetRuntimeEnvironmentFactory()Gets the anonymous instance of the runtime environment factory using the classloader of this registry.RuntimeManagergetRuntimeManager()Gets the runtime manager for this client service, which is usually a local runtime manager.Map<RichAgent,URI[]>getRuntimeManagerURIs()Returns the runtime managers that are currently available on this client.RuntimeServicegetRuntimeService()Gets the runtime service for this client service allowing to execute activities directly by the caller and not in a runtime manager.LoggingScheduledThreadPoolExecutorgetScheduledExecutorService()Gets aScheduledExecutorServicefor scheduling long lasting tasks asynchronously.<T extends ADEPT2Service>
TgetService(SessionToken session, String serviceName, 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>
TgetService(SessionToken session, URI[] serviceURIs, 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>
TgetServiceOfType(SessionToken session, String typeName, Class<T> serviceType)Returns the service instance of the designated service type which is configured for usage by this (the requesting) service instance.SessionTokengetSessionToken()Gets a session token for currently active agent and the URIs of this client.SessionTokengetSessionToken(QualifiedAgent agent)Gets a session token for the designated agent ignoring the currently active agent.SessionTokengetSessionToken(QualifiedAgent agent, Map<String,String> additionalAttributes)Gets a session token for the designated agent ignoring the currently active agent having the designated additional attributes.SessionTokengetSessionToken(Map<String,String> additionalAttributes)Gets a session token for currently active agent and the URIs of this client having the designated additional attributes.StringgetSimpleInstanceName(String instanceName)Returns the simple name of the designated component instance as used in configuration files.SimpleProcessImageRenderergetSimpleProcessImageRenderer()SynchronousActivityStartinggetSynchronousActivityStarting(EBPInstanceReference activity)Gets the interface for (synchronous) start operations of the designated activity independently from the execution manager holding the activity.UpdateManagergetUpdateManager()Gets the update manager which informs about changes in process objects.LocalegetUsedLocale(RichAgent agent)Returns the locale which the designated agent has chosen on this client.protected abstract StringgetUserSessionID()Gets the session identifying the current request.WorklistManagergetWorklistManager()Gets the worklist manager for logging on and retrieving a worklist and updates from.WorklistModelFactorygetWorklistModelFactory()CL_ARCH client service documentationvoidguiSelectionChanged(SelectedGUIElementChangedEvent selectionChangeEvent)This method informs all interestedlistenersabout 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.booleanhasAllCapabilities(SessionToken sessionToken, String... capabilities)Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has all of the designated capabilities.booleanhasAllTopLevelCapabilities(SessionToken sessionToken, String... capabilities)Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has all of the designated capabilities.booleanhasOneCapability(SessionToken sessionToken, String... capabilities)Checks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has at least one of the designated capabilities.booleanhasOneTopLevelCapability(SessionToken sessionToken, String... capabilities)Checks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has at least one of the designated capabilities.voidinit(URI[] localExportedUris, URI[] globalExportedUris)Copies the designated URI array and stores it internally and authenticates to the system and sets the session factory.booleanisConnected(String serviceName)Returns whether this client is connected to the designated service or not.voidlogoff()Logs the agent (that is with all organisational positions) off and invalidates the session factories.voidremoveActiveAgentListener(ClientService.ActiveAgentChangedListener listener)Removes the listener to receive events when the active agent has been changed.voidremoveGUIListener(SelectedGUIElementChangedListener selectedElementChangedListener)Removes a listener from further notifications of the selected GUI element.voidremoveServiceStateListener(ADEPT2Service service, ClientService.ServiceStateListener listener)Removes a listener from further notifications of the designatedADEPT2Service.protected voidremoveSession(String sessionID, boolean emergency)Removes the designated session that is the corresponding client service and the GUI manager will be removed.voidserverReturned(String serverName, URI[] serverURIs)Notifies this client (if it has not shutdown itself) that the designated server is running again.voidserverShutdown(String serverName, 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.voidsetActiveAgent(QualifiedAgent activeAgent)Sets the currently active agent.voidsetAuthenticatedAgents(ClientSessionFactory... csf)Sets the client session factories for this service which provide the session tokens for the using components.voidshutdown(boolean emergency)Awaits the termination of the active sessions and nulls the session factory.voidstart()Method setting the status to the current time.-
Methods inherited from class de.aristaflow.adept2.base.service.AbstractAuthenticatedService
_sessionActive, authenticateService, awaitActiveSessions, createChildSession, createSession, getAgent, getSecurityManager, getSessionFactory, getStartupRequired, getTopLevelAgent, getUserCredentials, globalSecurityManagerAvailable, isEarlyService, sessionHasAllCapabilities, sessionHasAllTopLevelCapabilities, sessionHasCapability, sessionHasOneCapability, sessionHasOneTopLevelCapability
-
Methods inherited from class de.aristaflow.adept2.base.service.AbstractADEPT2Service
_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, unprivilegeThread
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, ping, preShutdown
-
Methods inherited from interface de.aristaflow.adept2.core.client.RemoteClient
ping
-
-
-
-
Field Detail
-
sessionServiceMapping
protected final Map<String,ADEPT2ClientService> sessionServiceMapping
Mapping between a user-session-ID and an ADEPT2 client service.
-
activeAgentLock
protected final ReadWriteLock activeAgentLock
The lock for synchronising all access concerning the active agent, which is mainlysessionServiceMapping.
-
-
Constructor Detail
-
MultiplexingClientService
public MultiplexingClientService(org.apache.commons.configuration2.Configuration configuration, Registry registry) throws ConfigurationExceptionCreates a MultiplexingClientService with the designated registry, a logger for this and the designated required services.- Parameters:
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.- Throws:
ConfigurationException- If the password for this authenticated service cannot be parsed from the configuration, aConfigurationExceptionwill be thrown.
-
-
Method Detail
-
init
public void init(URI[] localExportedUris, URI[] globalExportedUris) throws AbortServiceException
Description copied from class:AbstractAuthenticatedServiceCopies the designated URI array and stores it internally and authenticates to the system and sets the session factory.
This method can be called any time in overriding init-methods.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.- Specified by:
initin interfaceADEPT2Service- Overrides:
initin classAbstractAuthenticatedService- Parameters:
localExportedUris- 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 ornullin case the service is not published.- Throws:
AbortServiceException- If authenticating at the security manager fails, anAbortServiceExceptionwill be thrown.
-
start
public void start() throws AbortServiceExceptionDescription copied from class:AbstractADEPT2ServiceMethod setting the status to the current time. Subclasses have to call this method!- Specified by:
startin interfaceADEPT2Service- Overrides:
startin classAbstractADEPT2Service- Throws:
AbortServiceException- If this service cannot be started due to a severe problem, anAbortServiceExceptionwill be thrown.ADEPT2Service.shutdown(boolean)will not be called when aborting; the service has to shut down itself/clean up before throwing the exception.
-
shutdown
public void shutdown(boolean emergency)
Description copied from class:AbstractAuthenticatedServiceAwaits the termination of the active sessions and nulls the session factory.- Specified by:
shutdownin interfaceADEPT2Service- Overrides:
shutdownin classAbstractAuthenticatedService- Parameters:
emergency- Whether the shutdown will be an emergency shutdown.
-
getAvailableLocales
public Locale[] getAvailableLocales()
Gets the locales the client supports, that is, the locales found as resources. This allows the user to choose an appropriate one in case the client does not have the locale the user prefers. The locales are global with respect to all client services, that is there is one array of locales for all user sessions.- Specified by:
getAvailableLocalesin interfaceClientService- Returns:
- The locales available for the client.
-
getExecutorService
public ExecutorService getExecutorService()
Gets anExecutorServicefor 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.
The returned service must not be shutdown; this is done by implementations of the client service. Additionally, it must not be configured since it is re-used for all users of the client service. The executor service is global with respect to all client services, that is there is only one for all user sessions.- Specified by:
getExecutorServicein interfaceClientService- Returns:
- An
ExecutorServicefor executing long lasting task asynchronously instead of creating own (local) threads.
-
getScheduledExecutorService
public LoggingScheduledThreadPoolExecutor getScheduledExecutorService()
Gets aScheduledExecutorServicefor 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.
The returned service must not be shutdown; this is done by implementations of the client service. Additionally, it must not be configured since it is re-used for all users of the client service. The scheduled executor service is global with respect to all client services, that is there is only one for all user sessions.- Specified by:
getScheduledExecutorServicein interfaceClientService- Returns:
- A
ScheduledExecutorServicefor scheduling long lasting task asynchronously instead of creating own (local) threads.
-
isConnected
public boolean isConnected(String serviceName)
Description copied from interface:ClientServiceReturns whether this client is connected to the designated service or not. If the client is not connected, the corresponding (AristaFlow-)service (managers) will be available. Components using this service have to adhere to this. AClientService.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.- Specified by:
isConnectedin interfaceClientService- Parameters:
serviceName- The name of the service of which to check whether this client service is connected to.- Returns:
- Whether this client is connected to the designated AristaFlow-service.
-
connectAll
public boolean connectAll()
Description copied from interface:ClientServiceTries to connect this client service to all AristaFlow-services. Whether connecting has been successful will be indicated by the return value.
Connecting an online client is a no-op.- Specified by:
connectAllin interfaceClientService- Returns:
- Whether connecting to the AristaFlow-services has been successful and the client is online now.
-
disconnectAll
public void disconnectAll()
Description copied from interface:ClientServiceDisconnects this client service from the AristaFlow-services. This does all the cleanup necessary when disconnecting, for instance logging off from the appropriate server-side services. However, the client (service) will not be shut down. This is done via the registry and incorporates logging off and shutting down local services.
Disconnecting an offline client is a no-op.- Specified by:
disconnectAllin interfaceClientService
-
addServiceStateListener
public boolean addServiceStateListener(ADEPT2Service service, ClientService.ServiceStateListener listener)
Description copied from interface:ClientServiceRegisters a listener to be informed about a change in the availability of anADEPT2Service.- Specified by:
addServiceStateListenerin interfaceClientService- Parameters:
service- 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.- Returns:
- Whether the designated service is currently available.
-
removeServiceStateListener
public void removeServiceStateListener(ADEPT2Service service, ClientService.ServiceStateListener listener)
Description copied from interface:ClientServiceRemoves a listener from further notifications of the designatedADEPT2Service.- Specified by:
removeServiceStateListenerin interfaceClientService- Parameters:
service- The service for which to no longer be informed about its availability.listener- The instance which to remove from availability notifications.
-
logoff
public void logoff()
Logs the agent (that is with all organisational positions) off and invalidates the session factories. Afterwards no session token can be created any more.
Active agent listeners will be notified withnullas active agent. This removes the GUI manager of the current user session and shuts down and removes the corresponding client service.- Specified by:
logoffin interfaceClientService
-
getSessionToken
public SessionToken getSessionToken()
Description copied from interface:ADEPT2ClientServiceGets a session token for currently active agent and the URIs of this client.- Specified by:
getSessionTokenin interfaceADEPT2ClientService- Specified by:
getSessionTokenin interfaceClientService- Returns:
- A session token for the currently active agent and the URIs of this client.
- See Also:
ClientSessionFactory.getSessionToken(URI[])
-
getSessionToken
public SessionToken getSessionToken(Map<String,String> additionalAttributes)
Description copied from interface:ClientServiceGets a session token for currently active agent and the URIs of this client having the designated additional attributes.- Specified by:
getSessionTokenin interfaceClientService- Parameters:
additionalAttributes- Additional attributes which are provided by the created session token. This may be null.- Returns:
- A session token for the currently active agent having the designated additional attributes and the URIs of this client or null in case no agent is active.
- See Also:
ClientSessionFactory.getSessionToken(Map)
-
getSessionToken
public SessionToken getSessionToken(QualifiedAgent agent)
Description copied from interface:ClientServiceGets a session token for the designated agent ignoring the currently active agent. If the designated agent is not logged on, anIllegalArgumentExceptionwill be thrown.- Specified by:
getSessionTokenin interfaceClientService- Parameters:
agent- The agent to retrieve a session token for.- Returns:
- A session token for the designated agent.
-
getSessionToken
public SessionToken getSessionToken(QualifiedAgent agent, Map<String,String> additionalAttributes)
Description copied from interface:ClientServiceGets a session token for the designated agent ignoring the currently active agent having the designated additional attributes. If the designated agent is not logged on, anIllegalArgumentExceptionwill be thrown.- Specified by:
getSessionTokenin interfaceClientService- Parameters:
agent- The agent to retrieve a session token for.additionalAttributes- Additional attributes which are provided by the created session token. This may be null.- Returns:
- A session token for the designated agent having the designated additional attributes.
-
getFilterFactory
public FilterFactory getFilterFactory()
Description copied from interface:ADEPT2ClientServiceCL_ARCH client service documentation- Specified by:
getFilterFactoryin interfaceADEPT2ClientService- Specified by:
getFilterFactoryin interfaceClientService- Returns:
- The factory for creating filters for models for this client.
-
getLocalisationFactory
public LocalisationFactory getLocalisationFactory()
Description copied from interface:ClientServiceGets the localisation factory.- Specified by:
getLocalisationFactoryin interfaceClientService- Returns:
- the localisation factory
-
getFormatterFactory
public SystemDataFormatterFactory getFormatterFactory()
Description copied from interface:ClientServiceGets the system data formatter factory.- Specified by:
getFormatterFactoryin interfaceClientService- Returns:
- the system data formatter factory
-
getGraphicalModelFactory
public GraphicalModelFactory getGraphicalModelFactory()
Description copied from interface:ADEPT2ClientServiceCL_ARCH client service documentation- Specified by:
getGraphicalModelFactoryin interfaceADEPT2ClientService- Returns:
- The factory for creating graphical model elements for this client.
-
getInitTabFactory
public InitTabFactory getInitTabFactory()
- Specified by:
getInitTabFactoryin interfaceAdministrationService
-
setAuthenticatedAgents
public void setAuthenticatedAgents(ClientSessionFactory... csf)
Sets the client session factories for this service which provide the session tokens for the using components. This method must only be called by the component managing the logon/logoff. The session factories have to be the ones provided by the authentication (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.
There has to be a session ID registered before calling this method! Additionally the very same session ID has to be used when retrieving the designated client session factory viaAuthentication.- Specified by:
setAuthenticatedAgentsin interfaceClientService- Parameters:
csf- The client session factories provided when authenticating.
-
agentsChanged
public RichAgent[] agentsChanged(QualifiedAgent... agents)
Description copied from interface:ClientServiceSignals this client service that the designated agents changed. Implementations should do best effort to update the corresponding client session factory. If one of the designated agents is unknown by this client service, it will be ignored.- Specified by:
agentsChangedin interfaceClientService- Parameters:
agents- The agents that have changed on the server.- Returns:
- The designated agents which have been updated by this client service.
-
getAuthenticatedAgents
public RichAgent[] getAuthenticatedAgents()
Description copied from interface:ADEPT2ClientServiceGets all authenticated agents of this clients usually this is one agent holding multiple organisational positions.- Specified by:
getAuthenticatedAgentsin interfaceADEPT2ClientService- Specified by:
getAuthenticatedAgentsin interfaceClientService- Returns:
- All authenticated agents of this client.
-
getActiveAgent
public RichAgent getActiveAgent()
Description copied from interface:ADEPT2ClientServiceGets the currently active agent. This is normally determined by a drop-down list or the active worklist if worklists are position-specific.- Specified by:
getActiveAgentin interfaceADEPT2ClientService- Specified by:
getActiveAgentin interfaceClientService- Returns:
- The currently active agent.
- See Also:
ClientSessionFactory.getAuthenticatedAgent()
-
getActiveClientSessionFactory
public ClientSessionFactory getActiveClientSessionFactory()
Description copied from interface:ClientServiceGets the client session factory of the currently active agent.- Specified by:
getActiveClientSessionFactoryin interfaceClientService- Returns:
- The client session factory of the currently active agent or
nullin case no agent is logged on.
-
setActiveAgent
public void setActiveAgent(QualifiedAgent activeAgent)
Description copied from interface:ClientServiceSets the currently active agent. This is either determined by a drop-down list or the active worklist if worklists are position-specific. All registeredlistenerswill be notified (asynchronously) about this.- Specified by:
setActiveAgentin interfaceClientService- Parameters:
activeAgent- The currently active agent, this must not be null.
-
addActiveAgentListener
public void addActiveAgentListener(ClientService.ActiveAgentChangedListener listener)
Description copied from interface:ClientServiceAdds the listener to receive events when the active agent has been changed.- Specified by:
addActiveAgentListenerin interfaceClientService- Parameters:
listener- The listener to receive events when the active agent has been changed.
-
removeActiveAgentListener
public void removeActiveAgentListener(ClientService.ActiveAgentChangedListener listener)
Description copied from interface:ClientServiceRemoves the listener to receive events when the active agent has been changed.- Specified by:
removeActiveAgentListenerin interfaceClientService- Parameters:
listener- The active agent listener to remove.
-
guiSelectionChanged
public void guiSelectionChanged(SelectedGUIElementChangedEvent selectionChangeEvent)
Description copied from interface:ClientServiceThis method informs all interestedlistenersabout 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.
- Specified by:
guiSelectionChangedin interfaceClientService- Parameters:
selectionChangeEvent- The event containing information like the selected element as well as the source of the event.
-
addGUIListener
public void addGUIListener(SelectedGUIElementChangedListener selectedElementChangedListener)
Description copied from interface:ClientServiceRegisters a listener to be informed about a change in the currently selected GUI element representing a model element.- Specified by:
addGUIListenerin interfaceClientService- Parameters:
selectedElementChangedListener- The listener to be informed about a change in the currently selected GUI element representing a model element.
-
removeGUIListener
public void removeGUIListener(SelectedGUIElementChangedListener selectedElementChangedListener)
Description copied from interface:ClientServiceRemoves a listener from further notifications of the selected GUI element.- Specified by:
removeGUIListenerin interfaceClientService- Parameters:
selectedElementChangedListener- The listener not to be informed any more about GUI selection changes.
-
getUpdateManager
public UpdateManager getUpdateManager()
Description copied from interface:ADEPT2ClientServiceGets the update manager which informs about changes in process objects. This is only an intermediate solution. For now, only a local update manager will be returned since there is no server-side update manager.- Specified by:
getUpdateManagerin interfaceADEPT2ClientService- Specified by:
getUpdateManagerin interfaceAdministrationService- Specified by:
getUpdateManagerin interfaceModellingClientService- Returns:
- The (local) update manager for this client.
-
getAuthentication
public Authentication getAuthentication()
Description copied from interface:ClientServiceGets the manager that handles authentication for the users of this client.- Specified by:
getAuthenticationin interfaceClientService- Returns:
- The manager handling authentication for the users of this client.
-
hasOneCapability
public boolean hasOneCapability(SessionToken sessionToken, String... capabilities) throws SecurityTokenIntegrityException
Description copied from interface:CapabilityCheckerChecks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has at least one of the designated capabilities.- Specified by:
hasOneCapabilityin interfaceCapabilityChecker- Parameters:
sessionToken- The session token of which to check the integrity and to return the capability of.capabilities- One ore more strings representing the capability/capabilities of the function the owner of this token wants to perform.- Returns:
- Whether the (security token of the) designated session has at least one of the designated capabilities.
- Throws:
SecurityTokenIntegrityException- If the designated session token has no integrity, aSecurityTokenIntegrityExceptionwill be thrown.- See Also:
Capabilities
-
hasOneTopLevelCapability
public boolean hasOneTopLevelCapability(SessionToken sessionToken, String... capabilities) throws SecurityTokenIntegrityException
Description copied from interface:CapabilityCheckerChecks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has at least one of the designated capabilities.- Specified by:
hasOneTopLevelCapabilityin interfaceCapabilityChecker- Parameters:
sessionToken- The session token of which to check the integrity and to return the capability of the corresponding top-level session token.capabilities- One or more strings representing the capability/capabilities of the function the owner of the top-level session token wants to perform.- Returns:
- Whether the (security token of the) top-level parent session of the designated session has at least one of the designated capabilities.
- Throws:
SecurityTokenIntegrityException- If the top-level parent session of the designated session token has no integrity, aSecurityTokenIntegrityExceptionwill be thrown.- See Also:
Capabilities
-
hasAllCapabilities
public boolean hasAllCapabilities(SessionToken sessionToken, String... capabilities) throws SecurityTokenIntegrityException
Description copied from interface:CapabilityCheckerChecks the integrity of the (security token of the) designated session token and returns whether the (security token of the) designated session has all of the designated capabilities.- Specified by:
hasAllCapabilitiesin interfaceCapabilityChecker- Parameters:
sessionToken- The session token of which to check the integrity and to return the capability of.capabilities- One ore more strings representing the capability/capabilities of the function the owner of this token wants to perform.- Returns:
- Whether the (security token of the) designated session has all of the designated capabilities.
- Throws:
SecurityTokenIntegrityException- If the designated session token has no integrity, aSecurityTokenIntegrityExceptionwill be thrown.- See Also:
Capabilities
-
hasAllTopLevelCapabilities
public boolean hasAllTopLevelCapabilities(SessionToken sessionToken, String... capabilities) throws SecurityTokenIntegrityException
Description copied from interface:CapabilityCheckerChecks the integrity of the (security token of the) top-level session of the designated session token and returns whether the (security token of the) top-level session of the designated session has all of the designated capabilities.- Specified by:
hasAllTopLevelCapabilitiesin interfaceCapabilityChecker- Parameters:
sessionToken- The session token of which to check the integrity and to return the capability of the corresponding top-level session token.capabilities- One or more strings representing the capability/capabilities of the function the owner of the top-level session token wants to perform.- Returns:
- Whether the (security token of the) top-level parent session of the designated session has all of the designated capabilities.
- Throws:
SecurityTokenIntegrityException- If the top-level parent session of the designated session token has no integrity, aSecurityTokenIntegrityExceptionwill be thrown.- See Also:
Capabilities
-
getLicenceManager
public LicenceManager getLicenceManager() throws ServiceNotKnownException
Gets the licence manager that provides the licence for all AristaFlow-services and products. This method is not user-session-specific and retrieves the licence manager with a special session of this multiplexing client service. This allows to retrieve the licence manager independent from whether a user has been logged on (and retrieved a user-specific client service).- Specified by:
getLicenceManagerin interfaceClientService- Returns:
- The licence manager providing the licence for all AristaFlow-services and products.
- Throws:
ServiceNotKnownException- If there are problems retrieving the licence manager, aServiceNotKnownExceptionwill be thrown.
-
getClusterName
public String getClusterName()
Description copied from interface:ClientServiceGets the name of the cluster this service belongs to. Use this name for identification purpose across clusters.- Specified by:
getClusterNamein interfaceClientService- Returns:
- The name of the cluster this service belongs to.
-
getActivityModelFactory
public ActivityModelFactory getActivityModelFactory()
Description copied from interface:ADEPT2ClientServiceCL_ARCH client service documentation- Specified by:
getActivityModelFactoryin interfaceActivityManagerService- Specified by:
getActivityModelFactoryin interfaceADEPT2ClientService- Returns:
- The activity model factory for this client
-
getProcessModelFactory
public ProcessModelFactory getProcessModelFactory()
Description copied from interface:ADEPT2ClientServiceCL_ARCH client service documentation- Specified by:
getProcessModelFactoryin interfaceActivityManagerService- Specified by:
getProcessModelFactoryin interfaceADEPT2ClientService- Specified by:
getProcessModelFactoryin interfaceAdministrationService- Specified by:
getProcessModelFactoryin interfaceLocalExecutionClientService- Specified by:
getProcessModelFactoryin interfaceModellingClientService- Returns:
- The process model factory for this client
-
getExecutionFactory
public ExecutionFactory getExecutionFactory()
- Specified by:
getExecutionFactoryin interfaceWorklistClientService
-
getResourceModelFactory
public de.aristaflow.adept2.model.resourcemodel.builder.ResourceModelFactory getResourceModelFactory()
- Specified by:
getResourceModelFactoryin interfaceAdministrationService- Specified by:
getResourceModelFactoryin interfaceModellingClientService
-
getWorklistModelFactory
public WorklistModelFactory getWorklistModelFactory()
Description copied from interface:WorklistClientServiceCL_ARCH client service documentation- Specified by:
getWorklistModelFactoryin interfaceWorklistClientService- Returns:
- The worklist model factory for this client
-
getProcessChecks
public ProcessCheckService getProcessChecks()
- Specified by:
getProcessChecksin interfaceADEPT2ClientService- Specified by:
getProcessChecksin interfaceModellingClientService
-
getActivityRepository
public ActivityRepository getActivityRepository()
Description copied from interface:ADEPT2ClientServiceCL_ARCH client service documentation- Specified by:
getActivityRepositoryin interfaceActivityManagerService- Specified by:
getActivityRepositoryin interfaceADEPT2ClientService- Returns:
- The activity repository for this client
-
getProcessManager
public ProcessManager getProcessManager()
Description copied from interface:ADEPT2ClientServiceCL_ARCH client service documentation- Specified by:
getProcessManagerin interfaceADEPT2ClientService- Specified by:
getProcessManagerin interfaceAdministrationService- Specified by:
getProcessManagerin interfaceModellingClientService- Returns:
- The process manager for this client
-
getSimpleProcessImageRenderer
public SimpleProcessImageRenderer getSimpleProcessImageRenderer()
- Specified by:
getSimpleProcessImageRendererin interfaceADEPT2ClientService- Specified by:
getSimpleProcessImageRendererin interfaceAdministrationService- Specified by:
getSimpleProcessImageRendererin interfaceLocalExecutionClientService
-
getProcessImageRenderer
public ProcessImageRenderer getProcessImageRenderer()
- Specified by:
getProcessImageRendererin interfaceADEPT2ClientService- Specified by:
getProcessImageRendererin interfaceAdministrationService- Specified by:
getProcessImageRendererin interfaceLocalExecutionClientService
-
getProcessManager
public ProcessManager getProcessManager(UUID instanceID)
Description copied from interface:AdministrationServiceCL_ARCH client service documentation- Specified by:
getProcessManagerin interfaceAdministrationService- Specified by:
getProcessManagerin interfaceWorklistClientService- Returns:
- The process manager for this client
-
getProcessRepository
public ProcessRepository getProcessRepository()
- Specified by:
getProcessRepositoryin interfaceAdministrationService
-
getOrgModelManager
public OrgModelManager getOrgModelManager()
Description copied from interface:ADEPT2ClientServiceCL_ARCH client service documentation- Specified by:
getOrgModelManagerin interfaceActivityManagerService- Specified by:
getOrgModelManagerin interfaceADEPT2ClientService- Specified by:
getOrgModelManagerin interfaceAdministrationService- Specified by:
getOrgModelManagerin interfaceWorklistClientService- Returns:
- The org model manager for this client
-
getExecutionManager
public ExecutionManager getExecutionManager()
- Specified by:
getExecutionManagerin interfaceADEPT2ClientService- Specified by:
getExecutionManagerin interfaceAdministrationService
-
getExecutionManagerForActivity
public ExecutionManager getExecutionManagerForActivity(EBPInstanceReference ebpInstanceReference)
Description copied from interface:LocalExecutionClientServiceReturns a reference to the execution manager that is responsible for the designated activity. If there is no running Execution Manager for the given activity an new one is created and registered with the URI provided by the Activity.- Specified by:
getExecutionManagerForActivityin interfaceLocalExecutionClientService- Parameters:
ebpInstanceReference- identifies the activity- Returns:
- The execution manager which is requested or null in case it could not be retrieved.
-
getProcessManagerForInstanceId
public ProcessManager getProcessManagerForInstanceId(UUID instId)
Description copied from interface:LocalExecutionClientServiceGets the process manager that is responsible for the instance with the designated (logical) ID.- Specified by:
getProcessManagerForInstanceIdin interfaceLocalExecutionClientService- Parameters:
instId- The (logical) ID of the instance for which to retrieve the corresponding process manager. This is resolved using the default execution manager.- Returns:
- The process manager handling the designated instance ID or
nullin case it could not be retrieved.
-
getProcessManagerForInstanceId
public ProcessManager getProcessManagerForInstanceId(URI[] execMgr, UUID instId)
Description copied from interface:LocalExecutionClientServiceGets the process manager that is responsible for the instance with the designated (logical) ID being executed on the designated execution manager.- Specified by:
getProcessManagerForInstanceIdin interfaceLocalExecutionClientService- Parameters:
execMgr- 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.- Returns:
- The process manager handling the designated instance ID or
nullin case it could not be retrieved (or the corresponding execution manager).
-
getProcessManagerForInstanceLogId
public ProcessManager getProcessManagerForInstanceLogId(URI[] execMgr, UUID instLogId)
Description copied from interface:LocalExecutionClientServiceGets the process manager that is responsible for the instance with the designated (internal) ID being executed on the designated execution manager.- Specified by:
getProcessManagerForInstanceLogIdin interfaceLocalExecutionClientService- Parameters:
execMgr- 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.- Returns:
- The process manager handling the designated instance ID or
nullin case it could not be retrieved (or the corresponding execution manager).
-
getInstanceControl
public InstanceControl getInstanceControl()
Description copied from interface:ADEPT2ClientServiceGets the interface for controlling an instance.
This is a convenience method forgetExecutionManager().getInstanceControl(). It may only be called when online.- Specified by:
getInstanceControlin interfaceADEPT2ClientService- Specified by:
getInstanceControlin interfaceAdministrationService- Specified by:
getInstanceControlin interfaceWorklistClientService- Returns:
- An interface allowing to control the execution of an instance.
- See Also:
ExecutionManager.getInstanceControl()
-
getActivityExecutionControl
public ActivityExecutionControl getActivityExecutionControl(EBPInstanceReference activity)
- Specified by:
getActivityExecutionControlin interfaceAdministrationService
-
getActivityStarting
public ActivityStarting getActivityStarting(EBPInstanceReference activity)
Description copied from interface:LocalExecutionClientServiceGets the interface for (asynchronous) start operations of the designated activity independently from the execution manager holding the activity.
This is a convenience method forgetExecutionManager().getActivityStarting()except that the returned interface also sets the appropriateRuntimeManager-URIs. It may only be called when online.- Specified by:
getActivityStartingin interfaceLocalExecutionClientService- Specified by:
getActivityStartingin interfaceWorklistClientService- Parameters:
activity- The activity for which to retrieve the corresponding (asynchronous) start interface of the appropriate execution manager.- Returns:
- An interface allowing to perform (asynchronous) start operations on the designated activity.
- See Also:
ExecutionManager.getActivityStarting()
-
getRemoteSynchronousActivityStarting
public Pair<SynchronousActivityStarting,Boolean> getRemoteSynchronousActivityStarting(EBPInstanceReference activity) throws ServiceNotKnownException
Description copied from interface:ExecutionClientServiceGets the interface for (synchronous) start operations of the designated activity independently from the execution manager holding the activity and the local runtime manager. This is similar toLocalExecutionClientService.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.
This is a convenience method forgetRuntimeManager().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).- Specified by:
getRemoteSynchronousActivityStartingin interfaceExecutionClientService- Specified by:
getRemoteSynchronousActivityStartingin interfaceRemoteExecutionClientService- Parameters:
activity- The activity for which to retrieve the corresponding (synchronous) start interface of the appropriate runtime manager.- Returns:
- An interface allowing to perform (synchronous) start operations on the designated activity and whether this refers to a remote activity starting. In this case the corresponding GUI has to be registered appropriately since the remote runtime manager cannot register it at the local client.
- Throws:
ServiceNotKnownException- If the runtime manager for the designated activity cannot be retrieved, aServiceNotKnownExceptionwill be thrown.- See Also:
RuntimeManager.getSynchronousActivityStarting()
-
getSynchronousActivityStarting
public SynchronousActivityStarting getSynchronousActivityStarting(EBPInstanceReference activity)
Description copied from interface:LocalExecutionClientServiceGets the interface for (synchronous) start operations of the designated activity independently from the execution manager holding the activity. Synchronous activity starting allows to wait until the application has been fully initialised including its GUI. Afterwards the GUI is returned to the starting component.
This is a convenience method forgetRuntimeManager().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).- Specified by:
getSynchronousActivityStartingin interfaceLocalExecutionClientService- Specified by:
getSynchronousActivityStartingin interfaceWorklistClientService- Parameters:
activity- The activity for which to retrieve the corresponding (synchronous) start interface of the appropriate runtime manager.- Returns:
- An interface allowing to perform (synchronous) start operations on the designated activity.
- See Also:
RuntimeManager.getSynchronousActivityStarting()
-
getRemoteGUIManager
public RemoteGUIManager getRemoteGUIManager() throws ServiceNotKnownException
Description copied from interface:ExecutionClientServiceGets the GUI manager for creating local GUI contexts for the GUI contexts that are transferred from a remotely executed activity. This GUI manager creates an appropriate local GUI context and usually handles the closing of this local GUI context which depends on the state of the remotely executed activity.- Specified by:
getRemoteGUIManagerin interfaceExecutionClientService- Specified by:
getRemoteGUIManagerin interfaceRemoteExecutionClientService- Returns:
- The GUI manager for creating local GUI contexts the GUI contexts that are transferred from a remotely executed activity.
- Throws:
ServiceNotKnownException- If no remote GUI manager is available for this client, aServicNotKnownExceptionwill 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.
-
getInstanceChanging
public InstanceChanging getInstanceChanging()
Description copied from interface:ADEPT2ClientServiceGets the interface for changing an instance.
This is a convenience method forgetExecutionManager().getInstanceChanging(). It may only be called when online.- Specified by:
getInstanceChangingin interfaceADEPT2ClientService- Returns:
- An interface allowing to control the change of an instance.
- See Also:
ExecutionManager.getInstanceChanging()
-
getExecutionHistory
public ExecutionHistory getExecutionHistory()
Description copied from interface:LocalExecutionClientServiceGets the execution history.FIXME: the execution history is actually specific to a process manager, i.e. each p.m. can have its own execution history.
- Specified by:
getExecutionHistoryin interfaceLocalExecutionClientService- Returns:
- the execution history
-
getInitTabManager
public InitTabManager getInitTabManager()
- Specified by:
getInitTabManagerin interfaceAdministrationService
-
getResModelManager
public de.aristaflow.adept2.core.resmodelmanager.ResModelManager getResModelManager()
- Specified by:
getResModelManagerin interfaceAdministrationService- Specified by:
getResModelManagerin interfaceModellingClientService
-
getResModelExplorer
public de.aristaflow.adept2.core.resmodelmanager.ResModelExplorer getResModelExplorer()
- Specified by:
getResModelExplorerin interfaceLocalExecutionClientService- Specified by:
getResModelExplorerin interfaceWorklistClientService
-
getWorklistManager
public WorklistManager getWorklistManager()
Description copied from interface:WorklistClientServiceGets the worklist manager for logging on and retrieving a worklist and updates from.
It may only be called when online.- Specified by:
getWorklistManagerin interfaceWorklistClientService- Returns:
- The worklist manager providing worklist(s) for this client.
-
getRuntimeEnvironmentFactory
public RuntimeEnvironmentFactory getRuntimeEnvironmentFactory()
Description copied from interface:LocalExecutionClientServiceGets the anonymous instance of the runtime environment factory using the classloader of this registry.- Specified by:
getRuntimeEnvironmentFactoryin interfaceLocalExecutionClientService- Returns:
- The anonymous instance of the runtime environment factory.
-
getRuntimeService
public RuntimeService getRuntimeService()
Description copied from interface:LocalExecutionClientServiceGets the runtime service for this client service allowing to execute activities directly by the caller and not in a runtime manager. The caller has complete responsibility for the execution of the activity!- Specified by:
getRuntimeServicein interfaceLocalExecutionClientService- Specified by:
getRuntimeServicein interfaceWorklistClientService- Returns:
- The runtime service for this client service allowing to execute activities directly by the caller and not in a runtime manager.
-
getRuntimeManager
public RuntimeManager getRuntimeManager()
Description copied from interface:WorklistClientServiceGets the runtime manager for this client service, which is usually a local runtime manager. This differs from a runtime manager for specific activities, e. g. HTML-activities.- Specified by:
getRuntimeManagerin interfaceWorklistClientService- Returns:
- The runtime manager for this client service, which is usually a local runtime manager.
-
getAutoStartRuntimeManager
public URI[] getAutoStartRuntimeManager()
Description copied from interface:LocalExecutionClientServiceGets the URIs of the runtime manager for autostarting. Use this for starting a new instance thus allowing to autostart the first activity. In this case the first activity will be automatically started on the designated runtime manager right after instantiation.- Specified by:
getAutoStartRuntimeManagerin interfaceLocalExecutionClientService- Specified by:
getAutoStartRuntimeManagerin interfaceWorklistClientService- Returns:
- The URIs of the runtime manager for autostarting.
-
getExecutionControlManager
public ExecutionControlManager getExecutionControlManager(EBPInstanceReference activity)
Description copied from interface:LocalExecutionClientServiceGets the execution control manager for the designated activity. The execution control manager allows to control the execution of the running activity independently from where it is running.- Specified by:
getExecutionControlManagerin interfaceLocalExecutionClientService- Specified by:
getExecutionControlManagerin interfaceWorklistClientService- Parameters:
activity- The activity for which to retrieve the execution control manager of the appropriate runtime manager.- Returns:
- A manager allowing to control the execution of the designated activity independently from where the execution is located.
- See Also:
RuntimeManager.getExecutionControlManager()
-
getGUIManager
public GUIManager getGUIManager()
Description copied from interface:LocalExecutionClientServiceGets the GUI manager responsible for synchronising the currently selected element in the GUI. This allows to for instance to select a worklist entry and the corresponding application is set visible and in the foreground.- Specified by:
getGUIManagerin interfaceLocalExecutionClientService- Returns:
- A GUI manager providing the means to synchronise on the currently selected element.
-
getModelViewerClass
public Class<?> getModelViewerClass(String pluginID)
Gets the model viewer class for the designated plugin ID that allows type-save access to plugin data at model elements. If there is no model viewer configured for the designated plugin ID,nullwill 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.- Specified by:
getModelViewerClassin interfaceADEPT2ClientService- Specified by:
getModelViewerClassin interfaceModelViewerProvider- Parameters:
pluginID- 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.- Returns:
- The model viewer class for the designated plugin ID or
nullin case there is no model viewer for the designated plugin ID configured.
-
getModelFactory
public <T> T getModelFactory(String modelFactoryName, Class<T> modelFactoryType) throws ServiceNotKnownException
Gets the designated model factory registry. This method is not user-session-specific and retrieves the designated model factory globally.- Specified by:
getModelFactoryin interfaceServiceAccess- Type Parameters:
T- The type of the requested model factory registry.- Parameters:
modelFactoryName- The name of the requested model factory. Use the names declared inModelRegistryConstants. No other model factory registries need to exist.modelFactoryType- The type of the requested model factory registry.- Returns:
- The requested model factory registry. The object is never null.
- Throws:
ServiceNotKnownException- If- the requested model factory registry is not configured properly,
- the requested model factory registry cannot be created,
ServiceNotKnownExceptionwrapping aConfigurationExceptionwill be thrown.
-
getConfiguredPluginTypes
public Map<String,Class<?>> getConfiguredPluginTypes(SessionToken session)
Retrieves all plugin types declared for the instance using this interface. This method is not user-session-specific and retrieves the designated plugins globally.- Specified by:
getConfiguredPluginTypesin interfaceServiceAccess- Parameters:
session- The session which is used to check for access rights on this method.- Returns:
- All plugin types (names and corresponding classes) declared for the instance using this interface. This map may be empty.
-
getServiceOfType
public <T extends ADEPT2Service> T getServiceOfType(SessionToken session, String typeName, Class<T> serviceType) throws ServiceNotKnownException
Returns the service instance of the designated service type which is configured for usage by this (the requesting) service instance. If no special service instance is configured for usage, the default instance of the requested service type will be returned. This method is not user-session-specific and retrieves the designated service globally.- Specified by:
getServiceOfTypein interfaceServiceAccess- Type Parameters:
T- The type which the requested service is expected to be of. This is a subtype ofADEPT2Serviceand either the registered service type or a super type hereof.- Parameters:
session- The session which is used to check for access rights on this method.typeName- The type name of the requested service. Refer toComponentTypesandBaseConstantsfor valid predefined service type names. Other service type names are also valid if the corresponding services are configured appropriately.ADEPT2Serviceand the interface configured for the service type or a super type hereof.serviceType- The type of the requested service. This is a subtype ofADEPT2Serviceand the interface configured for the service type or a super type hereof.- Returns:
- The requested service (or a service stub). The object is never null.
- Throws:
ServiceNotKnownException- If- the service is not configured properly,
- the service cannot be created or started,
- a required service is not configured properly or cannot be started,
- the creation of a required service object fails,
- the service does not fulfil the
ADEPT2Service-interface appropriately, - an exception is thrown while creating or starting a required service,
ServiceNotKnownExceptionwill be thrown. This may encapsulate aConfigurationExceptionor anAbortServiceException.
-
getConfiguredPlugin
public <T> T getConfiguredPlugin(SessionToken session, Object usingInstance, String pluginTypeName, Class<T> pluginType) throws ServiceNotKnownException
Retrieves the default plugin of the designated type which is configured for the designated (using) instance. This is the same asServiceAccess.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.- Specified by:
getConfiguredPluginin interfaceServiceAccess- Type Parameters:
T- The type of the requested plugin.- Parameters:
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.- Returns:
- The requested plugin instance. The object is never null.
- Throws:
ServiceNotKnownException- If- the plugin type is not configured for the designated object,
- the plugin is not configured properly,
- the creation or the initialisation of the plugin instance fails,
ServiceNotKnownExceptionwrapping aConfigurationExceptionwill be thrown.
-
getConfiguredPlugins
public <T> Map<String,T> getConfiguredPlugins(SessionToken session, Object usingInstance, String pluginTypeName, Class<T> pluginType) throws ServiceNotKnownException
Retrieves all plugin instances (pre-configured and dynamic) of the designated plugin type. A new plugin instance will be created if an instance is not singleton or it has not been instantiated before. This method is not user-session-specific and retrieves the designated plugins globally.- Specified by:
getConfiguredPluginsin interfaceServiceAccess- Type Parameters:
T- The plugin type of the requested instances.- Parameters:
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.- Returns:
- The requested plugin instances, indexed by their instance id. This map may be empty.
- Throws:
ServiceNotKnownException- If- the plugin type is not configured for the designated object,
- the configuration of a plugin instance does not provide required configuration values,
- a plugin is not configured properly,
- the creation or the initialisation of a plugin instance fails,
ServiceNotKnownExceptionwill be thrown.
-
getConfiguredPlugin
public <T> T getConfiguredPlugin(SessionToken session, Object usingInstance, String pluginTypeName, Class<T> pluginType, String pluginInstanceName) throws ServiceNotKnownException
Retrieves the plugin having the designated type and instance name as well as type and which is configured for the designated (using) instance. The designated using instance need to support plugins of the requested type. The plugin may be configured in the server/client configuration or it may be a runtime plugin that is found (together with its configuration) when requested. A new plugin instance will be created if the instance is not singleton or it has not been instantiated before. This method is not user-session-specific and retrieves the designated plugin globally.- Specified by:
getConfiguredPluginin interfaceServiceAccess- Type Parameters:
T- The type of the requested plugin.- Parameters:
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.- Returns:
- The requested plugin instance. The object is never null.
- Throws:
ServiceNotKnownException- If- the plugin type is not configured for the designated object,
- the plugin is not configured properly,
- the plugin is to be used as a runtime plugin but the designated object does not allow for runtime plugins,
- the plugin is to be used as a runtime plugin but it is not found,
- the creation or the initialisation of the plugin instance fails,
ServiceNotKnownExceptionwrapping aConfigurationExceptionwill be thrown.
-
getService
public <T extends ADEPT2Service> T getService(SessionToken session, String serviceName, Class<T> serviceType) throws ServiceNotKnownException
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. This method is not user-session-specific and retrieves the designated service globally.- Specified by:
getServicein interfaceServiceAccess- Type Parameters:
T- The type of the requested service. This is a subtype ofADEPT2Serviceand either interface configured for the service type or a super type hereof.- Parameters:
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 ofADEPT2Serviceand the interface configured for the service type or a super type hereof.- Returns:
- The requested service (or a service stub). The object is never null.
- Throws:
ServiceNotKnownException- If- the service is not configured properly,
- the service cannot be created or started,
- a required service is not configured properly or cannot be started,
- the creation of a required service object fails,
- the service does not fulfill the
ADEPT2Service-interface appropriately, - an exception is thrown while creating or starting a required service,
ServiceNotKnownExceptionwill be thrown. This may encapsulate aConfigurationExceptionor anAbortServiceException.
-
getService
public <T extends ADEPT2Service> T getService(SessionToken session, URI[] serviceURIs, Class<T> serviceType) throws ServiceNotKnownException
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. An appropriate URI will be chosen, that is, a URI with a protocol supported by this registry. This method is not user-session-specific and retrieves the designated service globally.- Specified by:
getServicein interfaceServiceAccess- Type Parameters:
T- The type of the requested service. This is a subtype ofADEPT2Serviceand either interface configured for the service type or a super type hereof.- Parameters:
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 ofADEPT2Serviceand the interface configured for the service type or a super type hereof.- Returns:
- The requested service (or a service stub). The object is never null.
- Throws:
ServiceNotKnownException- If- no appropriate communication service is available for the designated URIs,
- the service is not configured properly,
- the service cannot be created or started,
- a required service is not configured properly or cannot be started,
- the creation of a required service object fails,
- the service does not fulfill the
ADEPT2Service-interface appropriately, - an exception is thrown while creating or starting a required service,
ServiceNotKnownExceptionwill be thrown. This may encapsulate aConfigurationExceptionor anAbortServiceException.
-
getHierarchicalInstanceName
public String getHierarchicalInstanceName(String componentType, String simpleName)
Returns a hierarchical instance name containing the component type as well as the instance name. The returned string resembles, for instance,/ProcessManager/PM1. This method is not user-session-specific and retrieves the designated service globally.- Specified by:
getHierarchicalInstanceNamein interfaceNameResolution- Parameters:
componentType- The type of the component to create the hierarchical name for.simpleName- The simple name of the component instance as defined in the configuration.- Returns:
- An instance name containing the component type and the simple component instance name.
-
getSimpleInstanceName
public String getSimpleInstanceName(String instanceName)
Returns the simple name of the designated component instance as used in configuration files. This method is not user-session-specific and retrieves the designated service globally.- Specified by:
getSimpleInstanceNamein interfaceNameResolution- Parameters:
instanceName- The hierarchical name of a component instance.- Returns:
- The simple name without the prepending type of the component instance.
-
getComponentType
public String getComponentType(String instanceName)
Returns the name of the component type of the designated component instance as used in configuration files. This method is not user-session-specific and retrieves the designated service globally.- Specified by:
getComponentTypein interfaceNameResolution- Parameters:
instanceName- The hierarchical name of a component instance.- Returns:
- The name of the component type.
-
getNames
public Pair<String,String> getNames(String instanceName)
Gets the component type name and the simple instance name of the designated component instance at once. This method is not user-session-specific and retrieves the designated service globally.- Specified by:
getNamesin interfaceNameResolution- Parameters:
instanceName- The hierarchical name of a component instance.- Returns:
- The name of the component type and the simple name of the designated component instance.
-
getFormattedSignature
public String getFormattedSignature(Class<?>[] parameterTypes)
Helper method for getting a string describing the parameter types as method signature for use in log messages and exceptions. This method is not user-session-specific and retrieves the designated service globally.- Specified by:
getFormattedSignaturein interfaceNameResolution- Parameters:
parameterTypes- All the parameter types of a method as instances ofClass.- Returns:
- A string describing the parameter types as method signature (concatenated and surrounded by parenthesis).
-
getInterfaceForComponentType
public Class<?> getInterfaceForComponentType(String componentType) throws ConfigurationException
Returns the class object of the corresponding interface / superclass, if the component type is declared. If not, the method throws aConfigurationException. 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.- Specified by:
getInterfaceForComponentTypein interfaceServiceAccess- Parameters:
componentType- The name of the component type of which to retrieve the configured interface.- Returns:
- The class object of the corresponding interface / superclass.
- Throws:
ConfigurationException- If the designated component type is not configured for this registry, aConfigurationExceptionwill be thrown.
-
getClientServiceOrException
public ADEPT2ClientService getClientServiceOrException()
Returns the ADEPT2ClientService which was mapped inaddClientServiceor throws anIllegalStateExceptionif no client session context is available.- Returns:
- The ADEPT2ClientService of the current user session.
- Throws:
IllegalStateException- If there is no client service found, anIllegalStateExceptionwill be thrown.
-
getClientService
public ADEPT2ClientService getClientService()
Returns the ADEPT2ClientService which was mapped inaddClientServiceornullif none was found.- Returns:
- The ADEPT2ClientService of the current user session or null in case no client service is found for the user session.
- Throws:
InvalidServiceStateException- If no user session ID is registered (e. g. for the current thread), anInvalidServiceStateExceptionwill be thrown.
-
getClientService
public ADEPT2ClientService getClientService(SessionToken session)
This method can be called to receive theADEPT2ClientServicewhich is mapped to the user session ID in the additionalAttributes of the SessionToken.- Parameters:
session- A session token containing the user session ID as an additional attribute.- Returns:
- ADEPT2ClientService The client service associated to the user session id.
- Throws:
ServiceAccessControlException- If the agent cannot be determined from the designated session token, aServiceAccessControlExceptionwill 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, anInvalidServiceStateExceptionwill be thrown.
-
removeSession
protected void removeSession(String sessionID, boolean emergency)
Removes the designated session that is the corresponding client service and the GUI manager will be removed. The client service will be shut down.
Callers must not have the active agent read lock!- Parameters:
sessionID- The session ID of which to remove the client service and the GUI manager.emergency- Whether the client service should be terminated quickly.
-
getUserSessionID
protected abstract String getUserSessionID()
Gets the session identifying the current request. This should usually be bound to the current thread.- Returns:
- A string identifying the current user session or
nullin case the current user session cannot be determined.
-
getOperatingSystemName
public String getOperatingSystemName()
Description copied from interface:RemoteClientReturns the name of the operating system of the client as specified bySystem.getProperty("os.name").- Specified by:
getOperatingSystemNamein interfaceRemoteClient- Returns:
- The name of the operating system of the client as specified by
System.getProperty("os.name").
-
getOperatingSystemVersion
public String getOperatingSystemVersion()
Description copied from interface:RemoteClientReturns the version of the operating system of the client as specified bySystem.getProperty("os.version").- Specified by:
getOperatingSystemVersionin interfaceRemoteClient- Returns:
- The version of the operating system of the client as specified by
System.getProperty("os.version").
-
getOperatingSystemArchitecture
public String getOperatingSystemArchitecture()
Description copied from interface:RemoteClientReturns the architecture of the operating system of the client as specified bySystem.getProperty("os.arch").- Specified by:
getOperatingSystemArchitecturein interfaceRemoteClient- Returns:
- The architecture of the operating system of the client as specified
by
System.getProperty("os.arch").
-
getJavaVersion
public String getJavaVersion()
Description copied from interface:RemoteClientReturns the version of the running Java Virtual Machine of the client as specified bySystem.getProperty("java.version").- Specified by:
getJavaVersionin interfaceRemoteClient- Returns:
- The version of the running Java Virtual Machine of the client as
specified by
System.getProperty("java.version").
-
getUsedLocale
public Locale getUsedLocale(RichAgent agent)
Returns the locale which the designated agent has chosen on this client. This may differ from the default locale of the client as well as the default locale for the agent. For instance, the default client locale is fr_FR, the default locale of the user is jp_JP. The client does not support asian languages, but the user can speak English, therefore en_GB is chosen as locale.
Per default, thelocale of the agentis 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.- Specified by:
getUsedLocalein interfaceRemoteClient- Parameters:
agent- The agent for whom to retrieve the configured language.- Returns:
- The configured language of the designated agent of the client or
nullin case the designated agent is not logged on.
-
getDefaultLocale
public Locale getDefaultLocale()
Description copied from interface:RemoteClientReturns the default locale of this client as specified byLocale.getDefault().- Specified by:
getDefaultLocalein interfaceRemoteClient- Returns:
- The default locale of this client as specified by
Locale.getDefault().
-
getDefaultCharset
public String getDefaultCharset()
Description copied from interface:RemoteClientReturns the default character set of this client as specified byCharset.defaultCharset().name().- Specified by:
getDefaultCharsetin interfaceRemoteClient- Returns:
- The default locale of this client as specified by
Charset.defaultCharset().name().
-
getLoggedOnAgents
public RichAgent[] getLoggedOnAgents()
Description copied from interface:RemoteClientReturns the agents that are currently logged on this client.- Specified by:
getLoggedOnAgentsin interfaceRemoteClient- Returns:
- An array containing all currently logged on agents on this client.
-
getRuntimeManagerURIs
public Map<RichAgent,URI[]> getRuntimeManagerURIs()
Description copied from interface:RemoteClientReturns the runtime managers that are currently available on this client. These are indexed by the agents to which a runtime manager belongs to. The agents are all logged on agents. Since not every agent needs to have a runtime manager, there may be null values in the map.- Specified by:
getRuntimeManagerURIsin interfaceRemoteClient- Returns:
- A map containing all currently available runtime managers on this client indexed by the corresponding agent.
-
serverShutdown
public void serverShutdown(String serverName, URI[] serverURIs, long shutdownTime, long estimatedDowntime)
Description copied from interface:RemoteClientNotifies this client that the designated server will be down in the designated period and for the estimated downtime. The designated URIs are the current URIs of the server, while the designated server name is logical. This allows to shutdown and return with different URIs.
The estimated downtime allows to client to decide whether to shutdown itself or to keep on running.- Specified by:
serverShutdownin interfaceRemoteClient- Parameters:
serverName- 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.- See Also:
RemoteClient.serverReturned(String, URI[])
-
serverReturned
public void serverReturned(String serverName, URI[] serverURIs)
Description copied from interface:RemoteClientNotifies this client (if it has not shutdown itself) that the designated server is running again. The designated name allows the client to change the URIs and use the new URIs from now on.- Specified by:
serverReturnedin interfaceRemoteClient- Parameters:
serverName- 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.
-
-