ClientChannel
Overview
ClientChannel is an abstract object used as prototype by custom client channels such as HTTPClientChannel. Custom client channels should implement post method.
Location
RemObjectsSDK.js
- Ancestry: ClientChannel
Properties
url
Holds full service URL containing protocol, location and port. Example: http://localhost:8099/bin/
url
Instance Methods
constructor ClientChannel
You don't need to create an instance of abstract class.
function constructor ClientChannel(aUrl)
Parameters:
- aUrl: string
dispatch
Sends message to the service and passes result to onSuccessFunction callback or server's error message to onErrorFunction callback. Called by service proxy class methods (usually generated by codegen).
onErrorFunction takes message and an exception object (usually local but it could be ROException) too. There is RemObjects.UTIL.showError function that can be passed as error callback and displays error message.
function dispatch(aMessage, onSuccessFunction, onErrorFunction)
Parameters:
- aMessage: Message
- onSuccessFunction: function (aMessage)
- onErrorFunction: function (aMessage, anException)
onLoginNeeded
Called when the channel receives EROSessionNotFound server exception. Initially holds a stub and should be replaced with a user function that performs actual login procedure and calls the callback function.
function onLoginNeeded(aCallback)
Parameters:
- aCallback: function ()