Class Protocol.Reply
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite<Protocol.Reply,Protocol.Reply.Builder>
-
- io.github.centrifugal.centrifuge.internal.protocol.Protocol.Reply
-
- All Implemented Interfaces:
com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,Protocol.ReplyOrBuilder
- Enclosing class:
- Protocol
public static final class Protocol.Reply extends com.google.protobuf.GeneratedMessageLite<Protocol.Reply,Protocol.Reply.Builder> implements Protocol.ReplyOrBuilder
Reply sent from a server to a client. ProtocolVersion1 uses id, error and result fields. ProtocolVersion2 uses id and one of the possible concrete result messages.
Protobuf typecentrifugal.centrifuge.protocol.Reply
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Protocol.Reply.Builder
Reply sent from a server to a client.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type extends java.lang.Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONNECT_FIELD_NUMBER
static int
ERROR_FIELD_NUMBER
static int
HISTORY_FIELD_NUMBER
static int
ID_FIELD_NUMBER
static int
PING_FIELD_NUMBER
static int
PRESENCE_FIELD_NUMBER
static int
PRESENCE_STATS_FIELD_NUMBER
static int
PUBLISH_FIELD_NUMBER
static int
PUSH_FIELD_NUMBER
static int
REFRESH_FIELD_NUMBER
static int
RESULT_FIELD_NUMBER
static int
RPC_FIELD_NUMBER
static int
SUB_REFRESH_FIELD_NUMBER
static int
SUBSCRIBE_FIELD_NUMBER
static int
UNSUBSCRIBE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)
Protocol.ConnectResult
getConnect()
.centrifugal.centrifuge.protocol.ConnectResult connect = 5;
static Protocol.Reply
getDefaultInstance()
Protocol.Error
getError()
Error can only be set in replies to commands.Protocol.HistoryResult
getHistory()
.centrifugal.centrifuge.protocol.HistoryResult history = 11;
int
getId()
Id will only be set to a value > 0 for replies to commands.Protocol.PingResult
getPing()
.centrifugal.centrifuge.protocol.PingResult ping = 12;
Protocol.PresenceResult
getPresence()
.centrifugal.centrifuge.protocol.PresenceResult presence = 9;
Protocol.PresenceStatsResult
getPresenceStats()
.centrifugal.centrifuge.protocol.PresenceStatsResult presence_stats = 10;
Protocol.PublishResult
getPublish()
.centrifugal.centrifuge.protocol.PublishResult publish = 8;
Protocol.Push
getPush()
ProtocolVersion2 server can send one of the following fields.Protocol.RefreshResult
getRefresh()
.centrifugal.centrifuge.protocol.RefreshResult refresh = 14;
com.google.protobuf.ByteString
getResult()
Result is used in ProtocolVersion1 only.Protocol.RPCResult
getRpc()
.centrifugal.centrifuge.protocol.RPCResult rpc = 13;
Protocol.SubRefreshResult
getSubRefresh()
.centrifugal.centrifuge.protocol.SubRefreshResult sub_refresh = 15;
Protocol.SubscribeResult
getSubscribe()
.centrifugal.centrifuge.protocol.SubscribeResult subscribe = 6;
Protocol.UnsubscribeResult
getUnsubscribe()
.centrifugal.centrifuge.protocol.UnsubscribeResult unsubscribe = 7;
boolean
hasConnect()
.centrifugal.centrifuge.protocol.ConnectResult connect = 5;
boolean
hasError()
Error can only be set in replies to commands.boolean
hasHistory()
.centrifugal.centrifuge.protocol.HistoryResult history = 11;
boolean
hasPing()
.centrifugal.centrifuge.protocol.PingResult ping = 12;
boolean
hasPresence()
.centrifugal.centrifuge.protocol.PresenceResult presence = 9;
boolean
hasPresenceStats()
.centrifugal.centrifuge.protocol.PresenceStatsResult presence_stats = 10;
boolean
hasPublish()
.centrifugal.centrifuge.protocol.PublishResult publish = 8;
boolean
hasPush()
ProtocolVersion2 server can send one of the following fields.boolean
hasRefresh()
.centrifugal.centrifuge.protocol.RefreshResult refresh = 14;
boolean
hasRpc()
.centrifugal.centrifuge.protocol.RPCResult rpc = 13;
boolean
hasSubRefresh()
.centrifugal.centrifuge.protocol.SubRefreshResult sub_refresh = 15;
boolean
hasSubscribe()
.centrifugal.centrifuge.protocol.SubscribeResult subscribe = 6;
boolean
hasUnsubscribe()
.centrifugal.centrifuge.protocol.UnsubscribeResult unsubscribe = 7;
static Protocol.Reply.Builder
newBuilder()
static Protocol.Reply.Builder
newBuilder(Protocol.Reply prototype)
static Protocol.Reply
parseDelimitedFrom(java.io.InputStream input)
static Protocol.Reply
parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Reply
parseFrom(byte[] data)
static Protocol.Reply
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Reply
parseFrom(com.google.protobuf.ByteString data)
static Protocol.Reply
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Reply
parseFrom(com.google.protobuf.CodedInputStream input)
static Protocol.Reply
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Reply
parseFrom(java.io.InputStream input)
static Protocol.Reply
parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Reply
parseFrom(java.nio.ByteBuffer data)
static Protocol.Reply
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Protocol.Reply>
parser()
-
Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
-
-
-
Field Detail
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ERROR_FIELD_NUMBER
public static final int ERROR_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RESULT_FIELD_NUMBER
public static final int RESULT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PUSH_FIELD_NUMBER
public static final int PUSH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONNECT_FIELD_NUMBER
public static final int CONNECT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SUBSCRIBE_FIELD_NUMBER
public static final int SUBSCRIBE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UNSUBSCRIBE_FIELD_NUMBER
public static final int UNSUBSCRIBE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PUBLISH_FIELD_NUMBER
public static final int PUBLISH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRESENCE_FIELD_NUMBER
public static final int PRESENCE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRESENCE_STATS_FIELD_NUMBER
public static final int PRESENCE_STATS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
HISTORY_FIELD_NUMBER
public static final int HISTORY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PING_FIELD_NUMBER
public static final int PING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RPC_FIELD_NUMBER
public static final int RPC_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REFRESH_FIELD_NUMBER
public static final int REFRESH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SUB_REFRESH_FIELD_NUMBER
public static final int SUB_REFRESH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getId
public int getId()
Id will only be set to a value > 0 for replies to commands. For pushes it will have zero value.
uint32 id = 1;
- Specified by:
getId
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The id.
-
hasError
public boolean hasError()
Error can only be set in replies to commands. For pushes it will have zero value.
.centrifugal.centrifuge.protocol.Error error = 2;
- Specified by:
hasError
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the error field is set.
-
getError
public Protocol.Error getError()
Error can only be set in replies to commands. For pushes it will have zero value.
.centrifugal.centrifuge.protocol.Error error = 2;
- Specified by:
getError
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The error.
-
getResult
public com.google.protobuf.ByteString getResult()
Result is used in ProtocolVersion1 only.
bytes result = 3;
- Specified by:
getResult
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The result.
-
hasPush
public boolean hasPush()
ProtocolVersion2 server can send one of the following fields. We are not using oneof here due to JSON interoperability concerns.
.centrifugal.centrifuge.protocol.Push push = 4;
- Specified by:
hasPush
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the push field is set.
-
getPush
public Protocol.Push getPush()
ProtocolVersion2 server can send one of the following fields. We are not using oneof here due to JSON interoperability concerns.
.centrifugal.centrifuge.protocol.Push push = 4;
- Specified by:
getPush
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The push.
-
hasConnect
public boolean hasConnect()
.centrifugal.centrifuge.protocol.ConnectResult connect = 5;
- Specified by:
hasConnect
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the connect field is set.
-
getConnect
public Protocol.ConnectResult getConnect()
.centrifugal.centrifuge.protocol.ConnectResult connect = 5;
- Specified by:
getConnect
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The connect.
-
hasSubscribe
public boolean hasSubscribe()
.centrifugal.centrifuge.protocol.SubscribeResult subscribe = 6;
- Specified by:
hasSubscribe
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the subscribe field is set.
-
getSubscribe
public Protocol.SubscribeResult getSubscribe()
.centrifugal.centrifuge.protocol.SubscribeResult subscribe = 6;
- Specified by:
getSubscribe
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The subscribe.
-
hasUnsubscribe
public boolean hasUnsubscribe()
.centrifugal.centrifuge.protocol.UnsubscribeResult unsubscribe = 7;
- Specified by:
hasUnsubscribe
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the unsubscribe field is set.
-
getUnsubscribe
public Protocol.UnsubscribeResult getUnsubscribe()
.centrifugal.centrifuge.protocol.UnsubscribeResult unsubscribe = 7;
- Specified by:
getUnsubscribe
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The unsubscribe.
-
hasPublish
public boolean hasPublish()
.centrifugal.centrifuge.protocol.PublishResult publish = 8;
- Specified by:
hasPublish
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the publish field is set.
-
getPublish
public Protocol.PublishResult getPublish()
.centrifugal.centrifuge.protocol.PublishResult publish = 8;
- Specified by:
getPublish
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The publish.
-
hasPresence
public boolean hasPresence()
.centrifugal.centrifuge.protocol.PresenceResult presence = 9;
- Specified by:
hasPresence
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the presence field is set.
-
getPresence
public Protocol.PresenceResult getPresence()
.centrifugal.centrifuge.protocol.PresenceResult presence = 9;
- Specified by:
getPresence
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The presence.
-
hasPresenceStats
public boolean hasPresenceStats()
.centrifugal.centrifuge.protocol.PresenceStatsResult presence_stats = 10;
- Specified by:
hasPresenceStats
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the presenceStats field is set.
-
getPresenceStats
public Protocol.PresenceStatsResult getPresenceStats()
.centrifugal.centrifuge.protocol.PresenceStatsResult presence_stats = 10;
- Specified by:
getPresenceStats
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The presenceStats.
-
hasHistory
public boolean hasHistory()
.centrifugal.centrifuge.protocol.HistoryResult history = 11;
- Specified by:
hasHistory
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the history field is set.
-
getHistory
public Protocol.HistoryResult getHistory()
.centrifugal.centrifuge.protocol.HistoryResult history = 11;
- Specified by:
getHistory
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The history.
-
hasPing
public boolean hasPing()
.centrifugal.centrifuge.protocol.PingResult ping = 12;
- Specified by:
hasPing
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the ping field is set.
-
getPing
public Protocol.PingResult getPing()
.centrifugal.centrifuge.protocol.PingResult ping = 12;
- Specified by:
getPing
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The ping.
-
hasRpc
public boolean hasRpc()
.centrifugal.centrifuge.protocol.RPCResult rpc = 13;
- Specified by:
hasRpc
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the rpc field is set.
-
getRpc
public Protocol.RPCResult getRpc()
.centrifugal.centrifuge.protocol.RPCResult rpc = 13;
- Specified by:
getRpc
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The rpc.
-
hasRefresh
public boolean hasRefresh()
.centrifugal.centrifuge.protocol.RefreshResult refresh = 14;
- Specified by:
hasRefresh
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the refresh field is set.
-
getRefresh
public Protocol.RefreshResult getRefresh()
.centrifugal.centrifuge.protocol.RefreshResult refresh = 14;
- Specified by:
getRefresh
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The refresh.
-
hasSubRefresh
public boolean hasSubRefresh()
.centrifugal.centrifuge.protocol.SubRefreshResult sub_refresh = 15;
- Specified by:
hasSubRefresh
in interfaceProtocol.ReplyOrBuilder
- Returns:
- Whether the subRefresh field is set.
-
getSubRefresh
public Protocol.SubRefreshResult getSubRefresh()
.centrifugal.centrifuge.protocol.SubRefreshResult sub_refresh = 15;
- Specified by:
getSubRefresh
in interfaceProtocol.ReplyOrBuilder
- Returns:
- The subRefresh.
-
parseFrom
public static Protocol.Reply parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Reply parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Reply parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Reply parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Reply parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Reply parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Reply parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protocol.Reply parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Protocol.Reply parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Protocol.Reply parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protocol.Reply parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protocol.Reply parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilder
public static Protocol.Reply.Builder newBuilder()
-
newBuilder
public static Protocol.Reply.Builder newBuilder(Protocol.Reply prototype)
-
dynamicMethod
protected final java.lang.Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1)
- Specified by:
dynamicMethod
in classcom.google.protobuf.GeneratedMessageLite<Protocol.Reply,Protocol.Reply.Builder>
-
getDefaultInstance
public static Protocol.Reply getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Protocol.Reply> parser()
-
-