Package com.parse
Class PushRouter
- java.lang.Object
-
- com.parse.PushRouter
-
public class PushRouter extends java.lang.Object
PushRouter handles distribution of push payloads through a broadcast intent with the "com.parse.push.intent.RECEIVE" action. It also serializes a history of the last several pushes seen by this app. This history is necessary for two reasons:- For PPNS, we provide the last-seen timestamp to the server as part of the handshake. This is used as a cursor into the server-side inbox of recent pushes for this client. - For GCM, we use the history to deduplicate pushes when GCM decides to change the canonical registration id for a client (which can result in duplicate pushes while both the old and new registration id are still valid).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PushRouter
getInstance()
java.lang.String
getLastReceivedTimestamp()
boolean
handlePush(java.lang.String pushId, java.lang.String timestamp, java.lang.String channel, JSONObject data)
-
-
-
Method Detail
-
getInstance
public static PushRouter getInstance()
-
getLastReceivedTimestamp
public java.lang.String getLastReceivedTimestamp()
-
handlePush
public boolean handlePush(java.lang.String pushId, java.lang.String timestamp, java.lang.String channel, JSONObject data)
-
-