mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-25 09:08:05 +01:00
36 lines
640 B
Java
36 lines
640 B
Java
package org.whispersystems.dispatch.redis;
|
|
|
|
import com.google.common.base.Optional;
|
|
|
|
public class PubSubReply {
|
|
|
|
public enum Type {
|
|
MESSAGE,
|
|
SUBSCRIBE,
|
|
UNSUBSCRIBE
|
|
}
|
|
|
|
private final Type type;
|
|
private final String channel;
|
|
private final Optional<byte[]> content;
|
|
|
|
public PubSubReply(Type type, String channel, Optional<byte[]> content) {
|
|
this.type = type;
|
|
this.channel = channel;
|
|
this.content = content;
|
|
}
|
|
|
|
public Type getType() {
|
|
return type;
|
|
}
|
|
|
|
public String getChannel() {
|
|
return channel;
|
|
}
|
|
|
|
public Optional<byte[]> getContent() {
|
|
return content;
|
|
}
|
|
|
|
}
|