Interface RemoteClient

    • Method Detail

      • 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().
      • 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.
      • 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(String, URI[])
      • 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.