Class: DataResponse

lightstreamer-adapter/dataprovider~ DataResponse

Private constructor arguments: {Object} message the request data {Function} successHandler a callback to the DataProvider function for a successful response {Function} errorHandler a callback to the DataProvider function for an error response

new DataResponse

DataResponse constructor. An instance of this class is passed as argument to an event listener, and must be used to respond to the remote adapter request, using the success method or the error method.

Method Summary

error
Sends an error response.
success
Sends a successful response.

Method Detail

<inner> error

Sends an error response. The optional exception type parameter that can be used to issue a proper type of exceptiond depends on the event handled as described in the following table:
  • subscribe: "subscription"
  • unsubscribe: "subscription"
Parameters:
Name Type Argument Description
exceptionMessage String exception message
exceptionType String <optional>
exception type

<inner> success

Sends a successful response.