| Modifier and Type | Field and Description |
|---|---|
protected boolean |
connectionDraining
Indicates whether the connection is in draining state, which means that
it will not accept any new downstream messages.
|
| Constructor and Description |
|---|
GcmDiffSyncHandler(ServerSyncEngine<T,S> syncEngine,
org.jivesoftware.smack.XMPPConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
createJsonAck(String to,
String messageId)
Creates a JSON encoded ACK message for an upstream message received from
an application.
|
protected void |
handleAckReceipt(com.fasterxml.jackson.databind.JsonNode jsonObject)
Handles an ACK.
|
protected void |
handleControlMessage(com.fasterxml.jackson.databind.JsonNode jsonObject) |
protected void |
handleNackReceipt(com.fasterxml.jackson.databind.JsonNode jsonObject)
Handles a NACK.
|
protected void |
messageReceived(com.fasterxml.jackson.databind.JsonNode json) |
void |
processPacket(org.jivesoftware.smack.packet.Packet packet) |
protected void |
send(String jsonRequest)
Sends a packet with contents provided.
|
protected volatile boolean connectionDraining
public GcmDiffSyncHandler(ServerSyncEngine<T,S> syncEngine, org.jivesoftware.smack.XMPPConnection connection)
protected void handleAckReceipt(com.fasterxml.jackson.databind.JsonNode jsonObject)
Logs a INFO message, but subclasses could override it to properly handle ACKs.
jsonObject - the messageObjectprotected void handleNackReceipt(com.fasterxml.jackson.databind.JsonNode jsonObject)
Logs a INFO message, but subclasses could override it to properly handle NACKs.
jsonObject - the messageObjectprotected void handleControlMessage(com.fasterxml.jackson.databind.JsonNode jsonObject)
protected static String createJsonAck(String to, String messageId)
to - RegistrationId of the device who sent the upstream message.messageId - messageId of the upstream message to be acknowledged to
CCS.public void processPacket(org.jivesoftware.smack.packet.Packet packet)
processPacket in interface org.jivesoftware.smack.PacketListenerprotected void messageReceived(com.fasterxml.jackson.databind.JsonNode json)
throws Exception
Exceptionprotected void send(String jsonRequest) throws org.jivesoftware.smack.SmackException.NotConnectedException
jsonRequest - the request in JSON formatSmackException.NotConnectedException - if not connectedCopyright © 2015 JBoss by Red Hat. All Rights Reserved.