Package com.iizix.gyro
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 SummaryModifier and TypeMethodDescription- void- assignAuthenticatedUser- (String userName, String hashPW) Changes the authenticated user to be used the next time the client is started.- boolean- getAllDeviceParameters- (ISensitiveParameterHandler sensitive, IDeviceParametersRefreshed callback) Refreshes all device parameters from the client device for the current app.- boolean- getDeviceParameters- (ISensitiveParameterHandler sensitive, DeviceParameter... params) Retrieves parameters from the client device for the current app.- boolean- saveDeviceParameters- (ISensitiveParameterHandler sensitive, DeviceParameter... params) Saves parameters on the client device for the current app.- void- sendStat- (String event, DeviceParameter... params) Sends statistics event to the analytics engine on the client to log the event.- boolean- triggerRemoteCloseWindow- (boolean ignoreCallbackListener) Triggers closing of the window on the client that was opened with triggerRemoteOpenWindow.- boolean- triggerRemoteOpenWindow- (String url, String target, WindowOptions options, IWindowCloseListener windowListener) Triggers opening of a browser window on the client.- void- triggerUnlockCheck- (int serial) Triggers a check for unlock event to the client side.
- Method Details- triggerUnlockCheckvoid 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.
 
- triggerRemoteOpenWindowboolean 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.
 
- triggerRemoteCloseWindowboolean 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.
 
- assignAuthenticatedUserChanges 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.
 
- sendStatSends 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.
 
- saveDeviceParametersSaves 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- DeviceParametervalue of- nullmeans that the device parameter and its value is removed from storage. Upon return of this method, each- DeviceParameterof- paramsis updated with a new state. Possible states are- DeviceParameter.State.SUCCESS,- DeviceParameter.State.UNAVAILABLE,- DeviceParameter.State.NOT_FOUNDor- DeviceParameter.State.ENCRYPT_ERROR.
- Returns:
- truefor success of at least one device parameter,- falsefor 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.
 
- getDeviceParametersRetrieves 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- DeviceParameteris either- DeviceParameter.State.SUCCESS,- DeviceParameter.State.NOT_FOUND,- DeviceParameter.State.UNAVAILABLEor- DeviceParameter.State.DECRYPT_ERROR.- Parameters:
- sensitive- Processor for sensitive information.
- params- The parameters to retrieve.
- Returns:
- truefor success,- falseif device parameters are not present. The return code is- trueif at least one device parameter was successfully retrieved. If- falseis returned and the- DevParamsinstance is not found in- EnvPropsfor the client, an error is logged in the server.
 
- getAllDeviceParametersboolean getAllDeviceParameters- (ISensitiveParameterHandler sensitive, IDeviceParametersRefreshed callback) Refreshes all device parameters from the client device for the current app. The state for each- DeviceParameteris either- DeviceParameter.State.SUCCESSor- DeviceParameter.State.DECRYPT_ERROR.- Parameters:
- sensitive- Processor for sensitive information.
- callback- The callback to invoke when parameters are refreshed.
- Returns:
- Success when true,falsewhen the client session is disposed of. Please note that if the client session is disposed before the device parameters are retrieved, thecallbackwill not be invoked. Upon success, thecallbackwill be invoked at a later stage in the client session thread.