Object - RestClientConfig
|Top Previous Next|
During connection establishment the 200 OK response to the 'connect' method contains the JSON object restClientConfig that defines behavior of all subsequent invocations regarding error handling, parameter overwrite and building the set of passed fields. If restClientConfig wasn't passed, the default values from the below table are used.
Here is an example of the restClientConfig. In this example, the config has only the 'ConnectionStatusEvent' method. The same way other method can be described in the config. If a method isn't described, the default values are used.
Interpreting the example:
●For the ConnectionStatusEvent method, the following settings are defined: restExclude, clientExclude, restOnError, restPolicy, restOverwrite.
●When this method is invoked, all fields are delivered to the Web-server, because restExclude="".
●When this method is invoked, all fields are delivered to the client as well, because clientExclude="".
●In case of errors when invoking the web-server, these error are logged, but not passed to the client. At the same time, a normal event ConnectionStatusEvent is passed to the client, because this event is Type II. (see Method types).
●Even if the web-server returns new parameters, they are not overwritten, because of restPolicy:"NOTIFY".
●The restOverwrite field does not work here, because overwriting is disabled in restPolicy.
The same way restClientConfig can describe configuration of other invocations, such as: call, OnCallEvent, CallStatusEvent, sendMessage, OnMessageEvent, MessageStatusEvent, and so on.