Class: GDPushChannelResponse

GDPushChannelResponse(json) → {GDPushChannelResponse}

This class encapsulates the response returned from the GDPush class.

Constructor

new GDPushChannelResponse(json) → {GDPushChannelResponse}

Parameters:
Name Type Description
json string The input data (formatted as JSON text) used to construct the response object.
Properties:
Name Type Description
channelID string The unique ID for the push channel that generated this response.
responseType string This value is used to distinguish what action triggered this response. Valid values are:
  • open - The channel was just successfully opened.
  • message - A new message was received from the server. The responseData property will be populated with the data from the server.
  • error - A channel error occurred. The responseData may or may not be populated with a description of the error.
  • close - The channel connection was closed.
  • pingFail - Ping Failure is an optional feature of the Push Channel framework. The application server registers for ping after receiving the Push Channel token from the client. If an application server registers for ping, then the server will be periodically checked ("pinged") by the BlackBerry Dynamics Network Operating Center (NOC). If the application server does not respond to a ping, then the NOC notifies the client.
responseData string This field will be populated with data from the server if the response contained data what was intended to be processed by the client.
Source:
Returns:
Type
GDPushChannelResponse
Example
// This object is used by GDPushChannel.parseChannelResponse() method and is not used directly