Interface RemoteClient

All Known Subinterfaces:
ActivityManagerService, ADEPT2ClientService, AdministrationService, ClientService, ExecutionClientService, LocalExecutionClientService, ModellingClientService, RemoteExecutionClientService, WorklistClientService
All Known Implementing Classes:
MultiplexingClientService

public interface RemoteClient
This interface provides access to all necessary information of a running client, for instance, information concerning the operating system, the logged on agents as well as the available runtime managers.
This interface is retrieved when contacting a client via URI. The client URIs can be retrieved by authorised components via the LogonManager.
Author:
Ulrich Kreher
  • Method Details

    • ping

      long ping()
      Checks whether the client is still available, that is, it may receive requests. This method returns the time the client has been started the last time. 0 indicates a client that has not been started yet, -1 indicates that the client has been shut down. Unavailability of the client is usually signalled via an IOException.
      Returns:
      The start time of the client, 0 for a client that has not been started, -1 for service that has been shut down.
      If you need the old boolean logic use 0 < ping().
    • getOperatingSystemName

      String getOperatingSystemName()
      Returns the name of the operating system of the client as specified by System.getProperty("os.name").
      Returns:
      The name of the operating system of the client as specified by System.getProperty("os.name").
    • getOperatingSystemVersion

      String getOperatingSystemVersion()
      Returns the version of the operating system of the client as specified by System.getProperty("os.version").
      Returns:
      The version of the operating system of the client as specified by System.getProperty("os.version").
    • getOperatingSystemArchitecture

      String getOperatingSystemArchitecture()
      Returns the architecture of the operating system of the client as specified by System.getProperty("os.arch").
      Returns:
      The architecture of the operating system of the client as specified by System.getProperty("os.arch").
    • getJavaVersion

      String getJavaVersion()
      Returns the version of the running Java Virtual Machine of the client as specified by System.getProperty("java.version").
      Returns:
      The version of the running Java Virtual Machine of the client as specified by System.getProperty("java.version").
    • getUsedLocale

      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, the locale of the agent is used.
      Parameters:
      agent - The agent for whom to retrieve the configured language.
      Returns:
      The configured language of the designated agent of the client or null in case the designated agent is not logged on.
    • getDefaultLocale

      Locale getDefaultLocale()
      Returns the default locale of this client as specified by Locale.getDefault().
      Returns:
      The default locale of this client as specified by Locale.getDefault().
    • getDefaultCharset

      String getDefaultCharset()
      Returns the default character set of this client as specified by Charset.defaultCharset().name().
      Returns:
      The default locale of this client as specified by Charset.defaultCharset().name().
    • getLoggedOnAgents

      RichAgent[] getLoggedOnAgents()
      Returns the agents that are currently logged on this client.
      Returns:
      An array containing all currently logged on agents on this client.
    • getRuntimeManagerURIs

      Map<RichAgent,URI[]> getRuntimeManagerURIs()
      Returns 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.
      Returns:
      A map containing all currently available runtime managers on this client indexed by the corresponding agent.
    • serverShutdown

      void serverShutdown(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. 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.
      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 invalid
      shutdownTime - 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:
    • serverReturned

      void serverReturned(String serverName, URI[] serverURIs)
      Notifies 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.
      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.