mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-27 00:53:18 +01:00
Refactor WebSocket support to use Redis for pubsub communication.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package org.whispersystems.textsecuregcm.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AcknowledgeWebsocketMessage extends IncomingWebsocketMessage {
|
||||
|
||||
@JsonProperty
|
||||
private long id;
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package org.whispersystems.textsecuregcm.entities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = false)
|
||||
public class IncomingWebsocketMessage {
|
||||
|
||||
public static final int TYPE_ACKNOWLEDGE_MESSAGE = 1;
|
||||
public static final int TYPE_PING_MESSAGE = 2;
|
||||
public static final int TYPE_PONG_MESSAGE = 3;
|
||||
|
||||
@JsonProperty
|
||||
private int type;
|
||||
|
||||
public IncomingWebsocketMessage() {}
|
||||
|
||||
public IncomingWebsocketMessage(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user