Global
Type Definitions
connectionParams
Configuration options to create the session.
Type
- Object
Properties
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
connectionParams |
Object |
Properties
|
Example
connectionParams
full example:
var appView = document.createElement("appview"); var connectionParams = { "launchType" : "embed", "container": appView, "bounds" :{ "autoresize":false, "width": "800", "height":"600" }, "preferredLang" : "ja" //Setting to Japanese }
eventListener (event)
Listener to handle the events.
Parameters
Name | Type | Description |
---|---|---|
event |
Object | Object as appropriate to the eventType registered. |
Properties
Name | Type | Description |
---|---|---|
event.id |
String | ID of the session object |
evebt.type |
String | Event type triggered |
event.data |
Object | Data as appropriate to the event triggered - onConnection - onConnectionClosed - onURLRedirection - onError |
onSessionCreated(sessionObject)
Callback having the session object created.
Parameters
Name | Type | Description |
---|---|---|
sessionObject |
Session | Session object to interact with the session like register and handle events, start and disconnect. |
Example
function sessionCreated(sessionObject) { //Handle session interactions like events, start, disconnect here. //ICADATA has been constructed for example. Recommending to use StoreFront/WebInterface SDK to get ICA. //Refer session.start() for more details. var icaData = { "Domain":"abcd", "ClearPassword":"xxxxxxxxx", "InitialProgram":"#Desktop", "Title":"Desktop", "Address":"xx.xx.xx.xx", "Username":"xyz" }; var launchData = {"type" :"json",value :icaData}; function sessionResponseCallback(response) { console.log("start", response); } sessionObject.start(launchData,sessionResponseCallback); }
responseCallback(response)
Callback that handles the response.
Parameters
Name | Type | Description |
---|---|---|
response |
Object | Response object |
Properties
Name | Type | Description |
---|---|---|
response.success |
boolean | Status of the method call. Holds the value true in case of success and false in case of failure. In case of failure, details of the error is set in the response object. |
response.sessionId |
String | Id of the session. |
response.error |
String | Reason for the failure of the method call. |