Class Protocol.Push
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite<Protocol.Push,Protocol.Push.Builder>
-
- io.github.centrifugal.centrifuge.internal.protocol.Protocol.Push
-
- All Implemented Interfaces:
com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,Protocol.PushOrBuilder
- Enclosing class:
- Protocol
public static final class Protocol.Push extends com.google.protobuf.GeneratedMessageLite<Protocol.Push,Protocol.Push.Builder> implements Protocol.PushOrBuilder
Push can be sent to a client as part of Reply in case of bidirectional transport or without additional wrapping in case of unidirectional transports. ProtocolVersion1 uses type, channel and data fields. ProtocolVersion2 uses channel and one of the possible concrete push messages.
Protobuf typecentrifugal.centrifuge.protocol.Push
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Protocol.Push.Builder
Push can be sent to a client as part of Reply in case of bidirectional transport or without additional wrapping in case of unidirectional transports.static class
Protocol.Push.PushType
Protobuf enumcentrifugal.centrifuge.protocol.Push.PushType
-
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
CHANNEL_FIELD_NUMBER
static int
CONNECT_FIELD_NUMBER
static int
DATA_FIELD_NUMBER
static int
DISCONNECT_FIELD_NUMBER
static int
JOIN_FIELD_NUMBER
static int
LEAVE_FIELD_NUMBER
static int
MESSAGE_FIELD_NUMBER
static int
PUB_FIELD_NUMBER
static int
REFRESH_FIELD_NUMBER
static int
SUBSCRIBE_FIELD_NUMBER
static int
TYPE_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)
java.lang.String
getChannel()
string channel = 2;
com.google.protobuf.ByteString
getChannelBytes()
string channel = 2;
Protocol.Connect
getConnect()
.centrifugal.centrifuge.protocol.Connect connect = 10;
com.google.protobuf.ByteString
getData()
Data is used in ProtocolVersion1 only.static Protocol.Push
getDefaultInstance()
Protocol.Disconnect
getDisconnect()
.centrifugal.centrifuge.protocol.Disconnect disconnect = 11;
Protocol.Join
getJoin()
.centrifugal.centrifuge.protocol.Join join = 5;
Protocol.Leave
getLeave()
.centrifugal.centrifuge.protocol.Leave leave = 6;
Protocol.Message
getMessage()
.centrifugal.centrifuge.protocol.Message message = 8;
Protocol.Publication
getPub()
ProtocolVersion2 server can push one of the following fields to the client.Protocol.Refresh
getRefresh()
.centrifugal.centrifuge.protocol.Refresh refresh = 12;
Protocol.Subscribe
getSubscribe()
.centrifugal.centrifuge.protocol.Subscribe subscribe = 9;
Protocol.Push.PushType
getType()
Type is used in ProtocolVersion1 only.int
getTypeValue()
Type is used in ProtocolVersion1 only.Protocol.Unsubscribe
getUnsubscribe()
.centrifugal.centrifuge.protocol.Unsubscribe unsubscribe = 7;
boolean
hasConnect()
.centrifugal.centrifuge.protocol.Connect connect = 10;
boolean
hasDisconnect()
.centrifugal.centrifuge.protocol.Disconnect disconnect = 11;
boolean
hasJoin()
.centrifugal.centrifuge.protocol.Join join = 5;
boolean
hasLeave()
.centrifugal.centrifuge.protocol.Leave leave = 6;
boolean
hasMessage()
.centrifugal.centrifuge.protocol.Message message = 8;
boolean
hasPub()
ProtocolVersion2 server can push one of the following fields to the client.boolean
hasRefresh()
.centrifugal.centrifuge.protocol.Refresh refresh = 12;
boolean
hasSubscribe()
.centrifugal.centrifuge.protocol.Subscribe subscribe = 9;
boolean
hasUnsubscribe()
.centrifugal.centrifuge.protocol.Unsubscribe unsubscribe = 7;
static Protocol.Push.Builder
newBuilder()
static Protocol.Push.Builder
newBuilder(Protocol.Push prototype)
static Protocol.Push
parseDelimitedFrom(java.io.InputStream input)
static Protocol.Push
parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Push
parseFrom(byte[] data)
static Protocol.Push
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Push
parseFrom(com.google.protobuf.ByteString data)
static Protocol.Push
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Push
parseFrom(com.google.protobuf.CodedInputStream input)
static Protocol.Push
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Push
parseFrom(java.io.InputStream input)
static Protocol.Push
parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Protocol.Push
parseFrom(java.nio.ByteBuffer data)
static Protocol.Push
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Protocol.Push>
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
-
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CHANNEL_FIELD_NUMBER
public static final int CHANNEL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DATA_FIELD_NUMBER
public static final int DATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PUB_FIELD_NUMBER
public static final int PUB_FIELD_NUMBER
- See Also:
- Constant Field Values
-
JOIN_FIELD_NUMBER
public static final int JOIN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LEAVE_FIELD_NUMBER
public static final int LEAVE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UNSUBSCRIBE_FIELD_NUMBER
public static final int UNSUBSCRIBE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MESSAGE_FIELD_NUMBER
public static final int MESSAGE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SUBSCRIBE_FIELD_NUMBER
public static final int SUBSCRIBE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONNECT_FIELD_NUMBER
public static final int CONNECT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DISCONNECT_FIELD_NUMBER
public static final int DISCONNECT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REFRESH_FIELD_NUMBER
public static final int REFRESH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTypeValue
public int getTypeValue()
Type is used in ProtocolVersion1 only.
.centrifugal.centrifuge.protocol.Push.PushType type = 1;
- Specified by:
getTypeValue
in interfaceProtocol.PushOrBuilder
- Returns:
- The enum numeric value on the wire for type.
-
getType
public Protocol.Push.PushType getType()
Type is used in ProtocolVersion1 only.
.centrifugal.centrifuge.protocol.Push.PushType type = 1;
- Specified by:
getType
in interfaceProtocol.PushOrBuilder
- Returns:
- The type.
-
getChannel
public java.lang.String getChannel()
string channel = 2;
- Specified by:
getChannel
in interfaceProtocol.PushOrBuilder
- Returns:
- The channel.
-
getChannelBytes
public com.google.protobuf.ByteString getChannelBytes()
string channel = 2;
- Specified by:
getChannelBytes
in interfaceProtocol.PushOrBuilder
- Returns:
- The bytes for channel.
-
getData
public com.google.protobuf.ByteString getData()
Data is used in ProtocolVersion1 only.
bytes data = 3;
- Specified by:
getData
in interfaceProtocol.PushOrBuilder
- Returns:
- The data.
-
hasPub
public boolean hasPub()
ProtocolVersion2 server can push one of the following fields to the client. We are not using oneof here due to JSON interoperability concerns.
.centrifugal.centrifuge.protocol.Publication pub = 4;
- Specified by:
hasPub
in interfaceProtocol.PushOrBuilder
- Returns:
- Whether the pub field is set.
-
getPub
public Protocol.Publication getPub()
ProtocolVersion2 server can push one of the following fields to the client. We are not using oneof here due to JSON interoperability concerns.
.centrifugal.centrifuge.protocol.Publication pub = 4;
- Specified by:
getPub
in interfaceProtocol.PushOrBuilder
- Returns:
- The pub.
-
hasJoin
public boolean hasJoin()
.centrifugal.centrifuge.protocol.Join join = 5;
- Specified by:
hasJoin
in interfaceProtocol.PushOrBuilder
- Returns:
- Whether the join field is set.
-
getJoin
public Protocol.Join getJoin()
.centrifugal.centrifuge.protocol.Join join = 5;
- Specified by:
getJoin
in interfaceProtocol.PushOrBuilder
- Returns:
- The join.
-
hasLeave
public boolean hasLeave()
.centrifugal.centrifuge.protocol.Leave leave = 6;
- Specified by:
hasLeave
in interfaceProtocol.PushOrBuilder
- Returns:
- Whether the leave field is set.
-
getLeave
public Protocol.Leave getLeave()
.centrifugal.centrifuge.protocol.Leave leave = 6;
- Specified by:
getLeave
in interfaceProtocol.PushOrBuilder
- Returns:
- The leave.
-
hasUnsubscribe
public boolean hasUnsubscribe()
.centrifugal.centrifuge.protocol.Unsubscribe unsubscribe = 7;
- Specified by:
hasUnsubscribe
in interfaceProtocol.PushOrBuilder
- Returns:
- Whether the unsubscribe field is set.
-
getUnsubscribe
public Protocol.Unsubscribe getUnsubscribe()
.centrifugal.centrifuge.protocol.Unsubscribe unsubscribe = 7;
- Specified by:
getUnsubscribe
in interfaceProtocol.PushOrBuilder
- Returns:
- The unsubscribe.
-
hasMessage
public boolean hasMessage()
.centrifugal.centrifuge.protocol.Message message = 8;
- Specified by:
hasMessage
in interfaceProtocol.PushOrBuilder
- Returns:
- Whether the message field is set.
-
getMessage
public Protocol.Message getMessage()
.centrifugal.centrifuge.protocol.Message message = 8;
- Specified by:
getMessage
in interfaceProtocol.PushOrBuilder
- Returns:
- The message.
-
hasSubscribe
public boolean hasSubscribe()
.centrifugal.centrifuge.protocol.Subscribe subscribe = 9;
- Specified by:
hasSubscribe
in interfaceProtocol.PushOrBuilder
- Returns:
- Whether the subscribe field is set.
-
getSubscribe
public Protocol.Subscribe getSubscribe()
.centrifugal.centrifuge.protocol.Subscribe subscribe = 9;
- Specified by:
getSubscribe
in interfaceProtocol.PushOrBuilder
- Returns:
- The subscribe.
-
hasConnect
public boolean hasConnect()
.centrifugal.centrifuge.protocol.Connect connect = 10;
- Specified by:
hasConnect
in interfaceProtocol.PushOrBuilder
- Returns:
- Whether the connect field is set.
-
getConnect
public Protocol.Connect getConnect()
.centrifugal.centrifuge.protocol.Connect connect = 10;
- Specified by:
getConnect
in interfaceProtocol.PushOrBuilder
- Returns:
- The connect.
-
hasDisconnect
public boolean hasDisconnect()
.centrifugal.centrifuge.protocol.Disconnect disconnect = 11;
- Specified by:
hasDisconnect
in interfaceProtocol.PushOrBuilder
- Returns:
- Whether the disconnect field is set.
-
getDisconnect
public Protocol.Disconnect getDisconnect()
.centrifugal.centrifuge.protocol.Disconnect disconnect = 11;
- Specified by:
getDisconnect
in interfaceProtocol.PushOrBuilder
- Returns:
- The disconnect.
-
hasRefresh
public boolean hasRefresh()
.centrifugal.centrifuge.protocol.Refresh refresh = 12;
- Specified by:
hasRefresh
in interfaceProtocol.PushOrBuilder
- Returns:
- Whether the refresh field is set.
-
getRefresh
public Protocol.Refresh getRefresh()
.centrifugal.centrifuge.protocol.Refresh refresh = 12;
- Specified by:
getRefresh
in interfaceProtocol.PushOrBuilder
- Returns:
- The refresh.
-
parseFrom
public static Protocol.Push parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Push parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Push parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Push 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.Push parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Push parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Protocol.Push parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protocol.Push parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Protocol.Push parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Protocol.Push parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protocol.Push parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Protocol.Push parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilder
public static Protocol.Push.Builder newBuilder()
-
newBuilder
public static Protocol.Push.Builder newBuilder(Protocol.Push 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.Push,Protocol.Push.Builder>
-
getDefaultInstance
public static Protocol.Push getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Protocol.Push> parser()
-
-