Interface IRemoteSessionControl


public interface IRemoteSessionControl
Interface that the framework session uses to perform functions on the client side.

This interface is only intended to be used by the framework.

Author:
Christopher Mindus
  • Method Details

    • triggerUnlockCheck

      void triggerUnlockCheck(int serial)
      Triggers a check for unlock event to the client side. Do not call this method, it is intended for the communications framework.
      Parameters:
      serial - The serial.
    • triggerRemoteOpenWindow

      boolean triggerRemoteOpenWindow(String url, String target, WindowOptions options, IWindowCloseListener windowListener)
      Triggers opening of a browser window on the client.
      Parameters:
      url - The URL to open.
      target - The target, null for _blank.
      options - Options to use, null for "new tab" for a browser client.
      windowListener - Callback to listen to blocked or user close window, null for none.
      Returns:
      true for success, false if the window cannot be opened because another window already is open or that the session is disposed of. In case of failure, any callback close listener will not be invoked.
    • triggerRemoteCloseWindow

      boolean triggerRemoteCloseWindow(boolean ignoreCallbackListener)
      Triggers closing of the window on the client that was opened with triggerRemoteOpenWindow.
      Parameters:
      ignoreCallbackListener - Flag to ignore calling a potential callback listener.
      Returns:
      true for success, false if no open window is present.
    • assignAuthenticatedUser

      void assignAuthenticatedUser(String userName, String hashPW)
      Changes the authenticated user to be used the next time the client is started.
      Parameters:
      userName - The user name.
      hashPW - The hashed password. It is based on PBKDF2 with Keyed-Hash Message Authentication Code (HMAC) with a SHA-256 hash. It can start with "EXTERNAL:" if the user has signed in using an external Sign In Provider, e.g. LinkedIn or Facebook, the remaining part of the string identifies the provider and the users identifier for that provider.
    • sendStat

      void sendStat(String event, DeviceParameter... params)
      Sends statistics event to the analytics engine on the client to log the event.
      Parameters:
      event - The event name.
      params - Parameters to send, null values and sensitive parameters are ignored.
    • saveDeviceParameters

      boolean saveDeviceParameters(ISensitiveParameterHandler sensitive, DeviceParameter... params)
      Saves parameters on the client device for the current app.

      Sensitive parameters are encrypted with a key kept on the server side. The encrypted data is padded and sent to the client and no key is used on the client side. Only the fingerprint of the server key used is included in the encrypted data. This means that the sensitive parameter is virtually undecipherable on the client side.

      Parameters:
      sensitive - Processor for sensitive information.
      params - Parameters to save. A DeviceParameter value of null means that the device parameter and its value is removed from storage. Upon return of this method, each DeviceParameter of params is updated with a new state. Possible states are DeviceParameter.State.SUCCESS, DeviceParameter.State.UNAVAILABLE, DeviceParameter.State.NOT_FOUND or DeviceParameter.State.ENCRYPT_ERROR.
      Returns:
      true for success of at least one device parameter, false for failure (or no parameters to save). In case of functional failure (i.e. not if a device parameter is not found), an error is logged in the server.
    • getDeviceParameters

      boolean getDeviceParameters(ISensitiveParameterHandler sensitive, DeviceParameter... params)
      Retrieves parameters from the client device for the current app. The variables values and state are filled in before the return of this method call. The state indicates success, some error or if the parameter is not found. The state for each DeviceParameter is either DeviceParameter.State.SUCCESS, DeviceParameter.State.NOT_FOUND, DeviceParameter.State.UNAVAILABLE or DeviceParameter.State.DECRYPT_ERROR.
      Parameters:
      sensitive - Processor for sensitive information.
      params - The parameters to retrieve.
      Returns:
      true for success, false if device parameters are not present. The return code is true if at least one device parameter was successfully retrieved. If false is returned and the DevParams instance is not found in EnvProps for the client, an error is logged in the server.
    • getAllDeviceParameters

      boolean getAllDeviceParameters(ISensitiveParameterHandler sensitive, IDeviceParametersRefreshed callback)
      Refreshes all device parameters from the client device for the current app. The state for each DeviceParameter is either DeviceParameter.State.SUCCESS or DeviceParameter.State.DECRYPT_ERROR.
      Parameters:
      sensitive - Processor for sensitive information.
      callback - The callback to invoke when parameters are refreshed.
      Returns:
      Success when true, false when the client session is disposed of. Please note that if the client session is disposed before the device parameters are retrieved, the callback will not be invoked. Upon success, the callback will be invoked at a later stage in the client session thread.