Class Protocol.Command
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite<Protocol.Command,Protocol.Command.Builder>
-
- io.github.centrifugal.centrifuge.internal.protocol.Protocol.Command
-
- All Implemented Interfaces:
com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,Protocol.CommandOrBuilder
- Enclosing class:
- Protocol
public static final class Protocol.Command extends com.google.protobuf.GeneratedMessageLite<Protocol.Command,Protocol.Command.Builder> implements Protocol.CommandOrBuilder
Command sent from a client to a server. ProtocolVersion1 uses id, method and params fields. ProtocolVersion2 uses id and one of the possible request messages.
Protobuf typecentrifugal.centrifuge.protocol.Command
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Protocol.Command.Builder
Command sent from a client to a server.static class
Protocol.Command.MethodType
Protobuf enumcentrifugal.centrifuge.protocol.Command.MethodType
-
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
HISTORY_FIELD_NUMBER
static int
ID_FIELD_NUMBER
static int
METHOD_FIELD_NUMBER
static int
PARAMS_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
REFRESH_FIELD_NUMBER
static int
RPC_FIELD_NUMBER
static int
SEND_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.ConnectRequest
getConnect()
ProtocolVersion2 client can send one of the following requests.static Protocol.Command
getDefaultInstance()
Protocol.HistoryRequest
getHistory()
.centrifugal.centrifuge.protocol.HistoryRequest history = 10;
int
getId()
Id of command to let client match replies to commands.Protocol.Command.MethodType
getMethod()
Method is used in ProtocolVersion1 only.int
getMethodValue()
Method is used in ProtocolVersion1 only.com.google.protobuf.ByteString
getParams()
Params is used in ProtocolVersion1 only.Protocol.PingRequest
getPing()
.centrifugal.centrifuge.protocol.PingRequest ping = 11;
Protocol.PresenceRequest
getPresence()
.centrifugal.centrifuge.protocol.PresenceRequest presence = 8;
Protocol.PresenceStatsRequest
getPresenceStats()
.centrifugal.centrifuge.protocol.PresenceStatsRequest presence_stats = 9;
Protocol.PublishRequest
getPublish()
.centrifugal.centrifuge.protocol.PublishRequest publish = 7;
Protocol.RefreshRequest
getRefresh()
.centrifugal.centrifuge.protocol.RefreshRequest refresh = 14;
Protocol.RPCRequest
getRpc()
.centrifugal.centrifuge.protocol.RPCRequest rpc = 13;
Protocol.SendRequest
getSend()
.centrifugal.centrifuge.protocol.SendRequest send = 12;
Protocol.SubRefreshRequest
getSubRefresh()
.centrifugal.centrifuge.protocol.SubRefreshRequest sub_refresh = 15;
Protocol.SubscribeRequest
getSubscribe()
.centrifugal.centrifuge.protocol.SubscribeRequest subscribe = 5;
Protocol.UnsubscribeRequest
getUnsubscribe()
.centrifugal.centrifuge.protocol.UnsubscribeRequest unsubscribe = 6;
boolean
hasConnect()
ProtocolVersion2 client can send one of the following requests.boolean
hasHistory()
.centrifugal.centrifuge.protocol.HistoryRequest history = 10;
boolean
hasPing()
.centrifugal.centrifuge.protocol.PingRequest ping = 11;
boolean
hasPresence()
.centrifugal.centrifuge.protocol.PresenceRequest presence = 8;
boolean
hasPresenceStats()
.centrifugal.centrifuge.protocol.PresenceStatsRequest presence_stats = 9;
boolean
hasPublish()
.centrifugal.centrifuge.protocol.PublishRequest publish = 7;
boolean
hasRefresh()
.centrifugal.centrifuge.protocol.RefreshRequest refresh = 14;
boolean
hasRpc()
.centrifugal.centrifuge.protocol.RPCRequest rpc = 13;
boolean
hasSend()
.centrifugal.centrifuge.protocol.SendRequest send = 12;
boolean
hasSubRefresh()
.centrifugal.centrifuge.protocol.SubRefreshRequest sub_refresh = 15;
boolean
hasSubscribe()
.centrifugal.centrifuge.protocol.SubscribeRequest subscribe = 5;
boolean
hasUnsubscribe()
.centrifugal.centrifuge.protocol.UnsubscribeRequest unsubscribe = 6;
static Protocol.Command.Builder
newBuilder()
static Protocol.Command.Builder
newBuilder(Protocol.Command prototype)
static Protocol.Command
parseDelimitedFrom(java.io.InputStream input)
static Protocol.Command
parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Command
parseFrom(byte[] data)
static Protocol.Command
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Command
parseFrom(com.google.protobuf.ByteString data)
static Protocol.Command
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Command
parseFrom(com.google.protobuf.CodedInputStream input)
static Protocol.Command
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Command
parseFrom(java.io.InputStream input)
static Protocol.Command
parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Command
parseFrom(java.nio.ByteBuffer data)
static Protocol.Command
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Protocol.Command>
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
-
METHOD_FIELD_NUMBER
public static final int METHOD_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PARAMS_FIELD_NUMBER
public static final int PARAMS_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
-
SEND_FIELD_NUMBER
public static final int SEND_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 of command to let client match replies to commands.
uint32 id = 1;
- Specified by:
getId
in interfaceProtocol.CommandOrBuilder
- Returns:
- The id.
-
getMethodValue
public int getMethodValue()
Method is used in ProtocolVersion1 only.
.centrifugal.centrifuge.protocol.Command.MethodType method = 2;
- Specified by:
getMethodValue
in interfaceProtocol.CommandOrBuilder
- Returns:
- The enum numeric value on the wire for method.
-
getMethod
public Protocol.Command.MethodType getMethod()
Method is used in ProtocolVersion1 only.
.centrifugal.centrifuge.protocol.Command.MethodType method = 2;
- Specified by:
getMethod
in interfaceProtocol.CommandOrBuilder
- Returns:
- The method.
-
getParams
public com.google.protobuf.ByteString getParams()
Params is used in ProtocolVersion1 only.
bytes params = 3;
- Specified by:
getParams
in interfaceProtocol.CommandOrBuilder
- Returns:
- The params.
-
hasConnect
public boolean hasConnect()
ProtocolVersion2 client can send one of the following requests. Server will only take the first non-null request out of these and may return an error if client passed more than one request. We are not using oneof here due to JSON interoperability concerns.
.centrifugal.centrifuge.protocol.ConnectRequest connect = 4;
- Specified by:
hasConnect
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the connect field is set.
-
getConnect
public Protocol.ConnectRequest getConnect()
ProtocolVersion2 client can send one of the following requests. Server will only take the first non-null request out of these and may return an error if client passed more than one request. We are not using oneof here due to JSON interoperability concerns.
.centrifugal.centrifuge.protocol.ConnectRequest connect = 4;
- Specified by:
getConnect
in interfaceProtocol.CommandOrBuilder
- Returns:
- The connect.
-
hasSubscribe
public boolean hasSubscribe()
.centrifugal.centrifuge.protocol.SubscribeRequest subscribe = 5;
- Specified by:
hasSubscribe
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the subscribe field is set.
-
getSubscribe
public Protocol.SubscribeRequest getSubscribe()
.centrifugal.centrifuge.protocol.SubscribeRequest subscribe = 5;
- Specified by:
getSubscribe
in interfaceProtocol.CommandOrBuilder
- Returns:
- The subscribe.
-
hasUnsubscribe
public boolean hasUnsubscribe()
.centrifugal.centrifuge.protocol.UnsubscribeRequest unsubscribe = 6;
- Specified by:
hasUnsubscribe
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the unsubscribe field is set.
-
getUnsubscribe
public Protocol.UnsubscribeRequest getUnsubscribe()
.centrifugal.centrifuge.protocol.UnsubscribeRequest unsubscribe = 6;
- Specified by:
getUnsubscribe
in interfaceProtocol.CommandOrBuilder
- Returns:
- The unsubscribe.
-
hasPublish
public boolean hasPublish()
.centrifugal.centrifuge.protocol.PublishRequest publish = 7;
- Specified by:
hasPublish
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the publish field is set.
-
getPublish
public Protocol.PublishRequest getPublish()
.centrifugal.centrifuge.protocol.PublishRequest publish = 7;
- Specified by:
getPublish
in interfaceProtocol.CommandOrBuilder
- Returns:
- The publish.
-
hasPresence
public boolean hasPresence()
.centrifugal.centrifuge.protocol.PresenceRequest presence = 8;
- Specified by:
hasPresence
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the presence field is set.
-
getPresence
public Protocol.PresenceRequest getPresence()
.centrifugal.centrifuge.protocol.PresenceRequest presence = 8;
- Specified by:
getPresence
in interfaceProtocol.CommandOrBuilder
- Returns:
- The presence.
-
hasPresenceStats
public boolean hasPresenceStats()
.centrifugal.centrifuge.protocol.PresenceStatsRequest presence_stats = 9;
- Specified by:
hasPresenceStats
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the presenceStats field is set.
-
getPresenceStats
public Protocol.PresenceStatsRequest getPresenceStats()
.centrifugal.centrifuge.protocol.PresenceStatsRequest presence_stats = 9;
- Specified by:
getPresenceStats
in interfaceProtocol.CommandOrBuilder
- Returns:
- The presenceStats.
-
hasHistory
public boolean hasHistory()
.centrifugal.centrifuge.protocol.HistoryRequest history = 10;
- Specified by:
hasHistory
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the history field is set.
-
getHistory
public Protocol.HistoryRequest getHistory()
.centrifugal.centrifuge.protocol.HistoryRequest history = 10;
- Specified by:
getHistory
in interfaceProtocol.CommandOrBuilder
- Returns:
- The history.
-
hasPing
public boolean hasPing()
.centrifugal.centrifuge.protocol.PingRequest ping = 11;
- Specified by:
hasPing
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the ping field is set.
-
getPing
public Protocol.PingRequest getPing()
.centrifugal.centrifuge.protocol.PingRequest ping = 11;
- Specified by:
getPing
in interfaceProtocol.CommandOrBuilder
- Returns:
- The ping.
-
hasSend
public boolean hasSend()
.centrifugal.centrifuge.protocol.SendRequest send = 12;
- Specified by:
hasSend
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the send field is set.
-
getSend
public Protocol.SendRequest getSend()
.centrifugal.centrifuge.protocol.SendRequest send = 12;
- Specified by:
getSend
in interfaceProtocol.CommandOrBuilder
- Returns:
- The send.
-
hasRpc
public boolean hasRpc()
.centrifugal.centrifuge.protocol.RPCRequest rpc = 13;
- Specified by:
hasRpc
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the rpc field is set.
-
getRpc
public Protocol.RPCRequest getRpc()
.centrifugal.centrifuge.protocol.RPCRequest rpc = 13;
- Specified by:
getRpc
in interfaceProtocol.CommandOrBuilder
- Returns:
- The rpc.
-
hasRefresh
public boolean hasRefresh()
.centrifugal.centrifuge.protocol.RefreshRequest refresh = 14;
- Specified by:
hasRefresh
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the refresh field is set.
-
getRefresh
public Protocol.RefreshRequest getRefresh()
.centrifugal.centrifuge.protocol.RefreshRequest refresh = 14;
- Specified by:
getRefresh
in interfaceProtocol.CommandOrBuilder
- Returns:
- The refresh.
-
hasSubRefresh
public boolean hasSubRefresh()
.centrifugal.centrifuge.protocol.SubRefreshRequest sub_refresh = 15;
- Specified by:
hasSubRefresh
in interfaceProtocol.CommandOrBuilder
- Returns:
- Whether the subRefresh field is set.
-
getSubRefresh
public Protocol.SubRefreshRequest getSubRefresh()
.centrifugal.centrifuge.protocol.SubRefreshRequest sub_refresh = 15;
- Specified by:
getSubRefresh
in interfaceProtocol.CommandOrBuilder
- Returns:
- The subRefresh.
-
parseFrom
public static Protocol.Command parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Command parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Command parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Command 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.Command parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Command parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Command parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protocol.Command parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Protocol.Command parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Protocol.Command parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protocol.Command parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protocol.Command parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilder
public static Protocol.Command.Builder newBuilder()
-
newBuilder
public static Protocol.Command.Builder newBuilder(Protocol.Command 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.Command,Protocol.Command.Builder>
-
getDefaultInstance
public static Protocol.Command getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Protocol.Command> parser()
-
-