diff --git a/README-CN.md b/README-CN.md index 73db639..b1315d8 100644 --- a/README-CN.md +++ b/README-CN.md @@ -18,7 +18,7 @@ plus.jdk spring-boot-starter-websocket - 1.0.5 + 1.0.7 ``` ## 配置 diff --git a/README.md b/README.md index 4544b40..a595fd1 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ plus.jdk spring-boot-starter-websocket - 1.0.5 + 1.0.7 ``` diff --git a/pom.xml b/pom.xml index e884b91..ff95dda 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ plus.jdk spring-boot-starter-websocket - 1.0.5 + 1.0.6 spring-boot-starter-websocket A simple websocket component base on netty diff --git a/protoc/message.proto b/protoc/message.proto index 5f351db..b4d9de0 100644 --- a/protoc/message.proto +++ b/protoc/message.proto @@ -14,11 +14,14 @@ enum MessageType { } message WsMessage { - optional string uid = 1; - optional string path = 2; + optional string message_id = 1; - optional bytes data = 3; + optional string uid = 2; - optional MessageType type = 4; + optional string path = 3; + + optional bytes data = 4; + + optional MessageType type = 5; } diff --git a/src/main/java/plus/jdk/websocket/global/IBroadMessagePromise.java b/src/main/java/plus/jdk/websocket/global/IBroadMessagePromise.java new file mode 100644 index 0000000..daa4ae7 --- /dev/null +++ b/src/main/java/plus/jdk/websocket/global/IBroadMessagePromise.java @@ -0,0 +1,11 @@ +package plus.jdk.websocket.global; + +import io.netty.channel.Channel; +import plus.jdk.websocket.model.IWsSession; +import plus.jdk.websocket.protoc.WsMessage; + + +public interface IBroadMessagePromise { + + void onCompletion(boolean success, WsMessage wsMessage, IWsSession session); +} diff --git a/src/main/java/plus/jdk/websocket/global/UserChannelConnectSynchronizer.java b/src/main/java/plus/jdk/websocket/global/UserChannelConnectSynchronizer.java index f914ab4..9527551 100644 --- a/src/main/java/plus/jdk/websocket/global/UserChannelConnectSynchronizer.java +++ b/src/main/java/plus/jdk/websocket/global/UserChannelConnectSynchronizer.java @@ -1,16 +1,12 @@ package plus.jdk.websocket.global; -import com.google.gson.Gson; import com.google.protobuf.ByteString; -import com.google.protobuf.InvalidProtocolBufferException; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelFutureListener; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.BeanFactory; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; -import org.springframework.scheduling.Trigger; -import org.springframework.scheduling.annotation.SchedulingConfigurer; -import org.springframework.scheduling.config.ScheduledTaskRegistrar; -import org.springframework.scheduling.support.PeriodicTrigger; import plus.jdk.broadcast.broadcaster.UdpBroadcastMessageMonitor; import plus.jdk.broadcast.broadcaster.UdpMessageBroadcaster; import plus.jdk.broadcast.broadcaster.model.BroadcastMessage; @@ -71,26 +67,41 @@ protected void sendBroadcast(Object userId, String path, byte[] data, Monitor[] @Override public void run(ApplicationArguments args) throws Exception { - if(properties.getBroadcastMonitorPort() <= 0) { + if (properties.getBroadcastMonitorPort() <= 0) { return; } Thread thread = new Thread(() -> udpBroadcastMessageMonitor.subscribe((ctx, msg) -> { WsMessage wsMessage = WsMessage.parseFrom(msg.getContent()); SessionGroupManager sessionGroupManager = beanFactory.getBean(SessionGroupManager.class); ConcurrentLinkedDeque> sessions = sessionGroupManager.getSession(wsMessage.getUid(), wsMessage.getPath()); - if(properties.getPrintBroadcastMessage()) { + if (properties.getPrintBroadcastMessage()) { log.info("receive broadcast message: {}", wsMessage); } for (IWsSession session : sessions) { - if(MessageType.MESSAGE_TYPE_TEXT.equals(wsMessage.getType())) { - session.sendText(new String(wsMessage.getData().toByteArray())); + ChannelFuture future = null; + if (MessageType.MESSAGE_TYPE_TEXT.equals(wsMessage.getType())) { + future = session.sendText(new String(wsMessage.getData().toByteArray())); } - if(MessageType.MESSAGE_TYPE_BINARY.equals(wsMessage.getType())) { - session.sendBinary(wsMessage.getData().toByteArray()); + if (MessageType.MESSAGE_TYPE_BINARY.equals(wsMessage.getType())) { + future = session.sendBinary(wsMessage.getData().toByteArray()); } + if (future == null) { + continue; + } + future.addListener((ChannelFutureListener) channelFuture -> { + if(properties.getMessagePushPromise() == null) { + return; + } + try { + IBroadMessagePromise promise = beanFactory.getBean(properties.getMessagePushPromise()); + promise.onCompletion(channelFuture.isSuccess(), wsMessage, session); + }catch(Exception e) { + log.error(e.getMessage()); + } + }); } return true; })); - thread.start(); + Runtime.getRuntime().addShutdownHook(thread); } } diff --git a/src/main/java/plus/jdk/websocket/properties/WebsocketProperties.java b/src/main/java/plus/jdk/websocket/properties/WebsocketProperties.java index cbb8230..becc4c7 100644 --- a/src/main/java/plus/jdk/websocket/properties/WebsocketProperties.java +++ b/src/main/java/plus/jdk/websocket/properties/WebsocketProperties.java @@ -4,6 +4,7 @@ import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import plus.jdk.websocket.global.DefaultSessionAuthenticatorManager; +import plus.jdk.websocket.global.IBroadMessagePromise; import plus.jdk.websocket.global.IWSSessionAuthenticatorManager; import plus.jdk.websocket.model.IWsSession; @@ -98,4 +99,9 @@ public class WebsocketProperties { * 认证器 */ private Class>> sessionAuthenticator = DefaultSessionAuthenticatorManager.class; + + /** + * 广播处理结果 + */ + private Class messagePushPromise; } diff --git a/src/main/java/plus/jdk/websocket/protoc/WsBroadcastMessage.java b/src/main/java/plus/jdk/websocket/protoc/WsBroadcastMessage.java index bb0b85e..f3c2540 100644 --- a/src/main/java/plus/jdk/websocket/protoc/WsBroadcastMessage.java +++ b/src/main/java/plus/jdk/websocket/protoc/WsBroadcastMessage.java @@ -29,10 +29,11 @@ public static void registerAllExtensions( static { java.lang.String[] descriptorData = { "\n\rmessage.proto\022\031plus.jdk.websocket.prot" + - "oc\"\241\001\n\tWsMessage\022\020\n\003uid\030\001 \001(\tH\000\210\001\001\022\021\n\004pa" + - "th\030\002 \001(\tH\001\210\001\001\022\021\n\004data\030\003 \001(\014H\002\210\001\001\0229\n\004type" + - "\030\004 \001(\0162&.plus.jdk.websocket.protoc.Messa" + - "geTypeH\003\210\001\001B\006\n\004_uidB\007\n\005_pathB\007\n\005_dataB\007\n" + + "oc\"\311\001\n\tWsMessage\022\027\n\nmessage_id\030\001 \001(\tH\000\210\001" + + "\001\022\020\n\003uid\030\002 \001(\tH\001\210\001\001\022\021\n\004path\030\003 \001(\tH\002\210\001\001\022\021" + + "\n\004data\030\004 \001(\014H\003\210\001\001\0229\n\004type\030\005 \001(\0162&.plus.j" + + "dk.websocket.protoc.MessageTypeH\004\210\001\001B\r\n\013" + + "_message_idB\006\n\004_uidB\007\n\005_pathB\007\n\005_dataB\007\n" + "\005_type*=\n\013MessageType\022\025\n\021MESSAGE_TYPE_TE" + "XT\020\000\022\027\n\023MESSAGE_TYPE_BINARY\020\001B3\n\031plus.jd" + "k.websocket.protocB\022WsBroadcastMessageH\002" + @@ -47,7 +48,7 @@ public static void registerAllExtensions( internal_static_plus_jdk_websocket_protoc_WsMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_plus_jdk_websocket_protoc_WsMessage_descriptor, - new java.lang.String[] { "Uid", "Path", "Data", "Type", "Uid", "Path", "Data", "Type", }); + new java.lang.String[] { "MessageId", "Uid", "Path", "Data", "Type", "MessageId", "Uid", "Path", "Data", "Type", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/src/main/java/plus/jdk/websocket/protoc/WsMessage.java b/src/main/java/plus/jdk/websocket/protoc/WsMessage.java index fb3c6cc..6075537 100644 --- a/src/main/java/plus/jdk/websocket/protoc/WsMessage.java +++ b/src/main/java/plus/jdk/websocket/protoc/WsMessage.java @@ -16,6 +16,7 @@ private WsMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private WsMessage() { + messageId_ = ""; uid_ = ""; path_ = ""; data_ = com.google.protobuf.ByteString.EMPTY; @@ -48,18 +49,64 @@ protected java.lang.Object newInstance( } private int bitField0_; - public static final int UID_FIELD_NUMBER = 1; + public static final int MESSAGE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object messageId_; + /** + * optional string message_id = 1; + * @return Whether the messageId field is set. + */ + @java.lang.Override + public boolean hasMessageId() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional string message_id = 1; + * @return The messageId. + */ + @java.lang.Override + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } + } + /** + * optional string message_id = 1; + * @return The bytes for messageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UID_FIELD_NUMBER = 2; private volatile java.lang.Object uid_; /** - * optional string uid = 1; + * optional string uid = 2; * @return Whether the uid field is set. */ @java.lang.Override public boolean hasUid() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** - * optional string uid = 1; + * optional string uid = 2; * @return The uid. */ @java.lang.Override @@ -76,7 +123,7 @@ public java.lang.String getUid() { } } /** - * optional string uid = 1; + * optional string uid = 2; * @return The bytes for uid. */ @java.lang.Override @@ -94,18 +141,18 @@ public java.lang.String getUid() { } } - public static final int PATH_FIELD_NUMBER = 2; + public static final int PATH_FIELD_NUMBER = 3; private volatile java.lang.Object path_; /** - * optional string path = 2; + * optional string path = 3; * @return Whether the path field is set. */ @java.lang.Override public boolean hasPath() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** - * optional string path = 2; + * optional string path = 3; * @return The path. */ @java.lang.Override @@ -122,7 +169,7 @@ public java.lang.String getPath() { } } /** - * optional string path = 2; + * optional string path = 3; * @return The bytes for path. */ @java.lang.Override @@ -140,18 +187,18 @@ public java.lang.String getPath() { } } - public static final int DATA_FIELD_NUMBER = 3; + public static final int DATA_FIELD_NUMBER = 4; private com.google.protobuf.ByteString data_; /** - * optional bytes data = 3; + * optional bytes data = 4; * @return Whether the data field is set. */ @java.lang.Override public boolean hasData() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** - * optional bytes data = 3; + * optional bytes data = 4; * @return The data. */ @java.lang.Override @@ -159,24 +206,24 @@ public com.google.protobuf.ByteString getData() { return data_; } - public static final int TYPE_FIELD_NUMBER = 4; + public static final int TYPE_FIELD_NUMBER = 5; private int type_; /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return Whether the type field is set. */ @java.lang.Override public boolean hasType() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return The type. */ @java.lang.Override public plus.jdk.websocket.protoc.MessageType getType() { @@ -313,14 +360,16 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - uid_ = ""; + messageId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - path_ = ""; + uid_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - data_ = com.google.protobuf.ByteString.EMPTY; + path_ = ""; bitField0_ = (bitField0_ & ~0x00000004); - type_ = 0; + data_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); + type_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -352,18 +401,22 @@ public plus.jdk.websocket.protoc.WsMessage buildPartial() { if (((from_bitField0_ & 0x00000001) != 0)) { to_bitField0_ |= 0x00000001; } - result.uid_ = uid_; + result.messageId_ = messageId_; if (((from_bitField0_ & 0x00000002) != 0)) { to_bitField0_ |= 0x00000002; } - result.path_ = path_; + result.uid_ = uid_; if (((from_bitField0_ & 0x00000004) != 0)) { to_bitField0_ |= 0x00000004; } - result.data_ = data_; + result.path_ = path_; if (((from_bitField0_ & 0x00000008) != 0)) { to_bitField0_ |= 0x00000008; } + result.data_ = data_; + if (((from_bitField0_ & 0x00000010) != 0)) { + to_bitField0_ |= 0x00000010; + } result.type_ = type_; result.bitField0_ = to_bitField0_; onBuilt(); @@ -404,16 +457,99 @@ public Builder addRepeatedField( } private int bitField0_; + private java.lang.Object messageId_ = ""; + /** + * optional string message_id = 1; + * @return Whether the messageId field is set. + */ + public boolean hasMessageId() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * optional string message_id = 1; + * @return The messageId. + */ + public java.lang.String getMessageId() { + java.lang.Object ref = messageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + messageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string message_id = 1; + * @return The bytes for messageId. + */ + public com.google.protobuf.ByteString + getMessageIdBytes() { + java.lang.Object ref = messageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + messageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string message_id = 1; + * @param value The messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + messageId_ = value; + onChanged(); + return this; + } + /** + * optional string message_id = 1; + * @return This builder for chaining. + */ + public Builder clearMessageId() { + bitField0_ = (bitField0_ & ~0x00000001); + messageId_ = getDefaultInstance().getMessageId(); + onChanged(); + return this; + } + /** + * optional string message_id = 1; + * @param value The bytes for messageId to set. + * @return This builder for chaining. + */ + public Builder setMessageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + bitField0_ |= 0x00000001; + messageId_ = value; + onChanged(); + return this; + } + private java.lang.Object uid_ = ""; /** - * optional string uid = 1; + * optional string uid = 2; * @return Whether the uid field is set. */ public boolean hasUid() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** - * optional string uid = 1; + * optional string uid = 2; * @return The uid. */ public java.lang.String getUid() { @@ -429,7 +565,7 @@ public java.lang.String getUid() { } } /** - * optional string uid = 1; + * optional string uid = 2; * @return The bytes for uid. */ public com.google.protobuf.ByteString @@ -446,7 +582,7 @@ public java.lang.String getUid() { } } /** - * optional string uid = 1; + * optional string uid = 2; * @param value The uid to set. * @return This builder for chaining. */ @@ -455,23 +591,23 @@ public Builder setUid( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; uid_ = value; onChanged(); return this; } /** - * optional string uid = 1; + * optional string uid = 2; * @return This builder for chaining. */ public Builder clearUid() { - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); uid_ = getDefaultInstance().getUid(); onChanged(); return this; } /** - * optional string uid = 1; + * optional string uid = 2; * @param value The bytes for uid to set. * @return This builder for chaining. */ @@ -481,7 +617,7 @@ public Builder setUidBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; uid_ = value; onChanged(); return this; @@ -489,14 +625,14 @@ public Builder setUidBytes( private java.lang.Object path_ = ""; /** - * optional string path = 2; + * optional string path = 3; * @return Whether the path field is set. */ public boolean hasPath() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** - * optional string path = 2; + * optional string path = 3; * @return The path. */ public java.lang.String getPath() { @@ -512,7 +648,7 @@ public java.lang.String getPath() { } } /** - * optional string path = 2; + * optional string path = 3; * @return The bytes for path. */ public com.google.protobuf.ByteString @@ -529,7 +665,7 @@ public java.lang.String getPath() { } } /** - * optional string path = 2; + * optional string path = 3; * @param value The path to set. * @return This builder for chaining. */ @@ -538,23 +674,23 @@ public Builder setPath( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; path_ = value; onChanged(); return this; } /** - * optional string path = 2; + * optional string path = 3; * @return This builder for chaining. */ public Builder clearPath() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); path_ = getDefaultInstance().getPath(); onChanged(); return this; } /** - * optional string path = 2; + * optional string path = 3; * @param value The bytes for path to set. * @return This builder for chaining. */ @@ -564,7 +700,7 @@ public Builder setPathBytes( throw new NullPointerException(); } checkByteStringIsUtf8(value); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; path_ = value; onChanged(); return this; @@ -572,15 +708,15 @@ public Builder setPathBytes( private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; /** - * optional bytes data = 3; + * optional bytes data = 4; * @return Whether the data field is set. */ @java.lang.Override public boolean hasData() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** - * optional bytes data = 3; + * optional bytes data = 4; * @return The data. */ @java.lang.Override @@ -588,7 +724,7 @@ public com.google.protobuf.ByteString getData() { return data_; } /** - * optional bytes data = 3; + * optional bytes data = 4; * @param value The data to set. * @return This builder for chaining. */ @@ -596,17 +732,17 @@ public Builder setData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; data_ = value; onChanged(); return this; } /** - * optional bytes data = 3; + * optional bytes data = 4; * @return This builder for chaining. */ public Builder clearData() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); data_ = getDefaultInstance().getData(); onChanged(); return this; @@ -614,32 +750,32 @@ public Builder clearData() { private int type_ = 0; /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return Whether the type field is set. */ @java.lang.Override public boolean hasType() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; type_ = value; onChanged(); return this; } /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return The type. */ @java.lang.Override @@ -649,7 +785,7 @@ public plus.jdk.websocket.protoc.MessageType getType() { return result == null ? plus.jdk.websocket.protoc.MessageType.UNRECOGNIZED : result; } /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @param value The type to set. * @return This builder for chaining. */ @@ -657,17 +793,17 @@ public Builder setType(plus.jdk.websocket.protoc.MessageType value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; type_ = value.getNumber(); onChanged(); return this; } /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return This builder for chaining. */ public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); type_ = 0; onChanged(); return this; diff --git a/src/main/java/plus/jdk/websocket/protoc/WsMessageOrBuilder.java b/src/main/java/plus/jdk/websocket/protoc/WsMessageOrBuilder.java index 5780621..8cbf5ae 100644 --- a/src/main/java/plus/jdk/websocket/protoc/WsMessageOrBuilder.java +++ b/src/main/java/plus/jdk/websocket/protoc/WsMessageOrBuilder.java @@ -8,62 +8,79 @@ public interface WsMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional string uid = 1; + * optional string message_id = 1; + * @return Whether the messageId field is set. + */ + boolean hasMessageId(); + /** + * optional string message_id = 1; + * @return The messageId. + */ + java.lang.String getMessageId(); + /** + * optional string message_id = 1; + * @return The bytes for messageId. + */ + com.google.protobuf.ByteString + getMessageIdBytes(); + + /** + * optional string uid = 2; * @return Whether the uid field is set. */ boolean hasUid(); /** - * optional string uid = 1; + * optional string uid = 2; * @return The uid. */ java.lang.String getUid(); /** - * optional string uid = 1; + * optional string uid = 2; * @return The bytes for uid. */ com.google.protobuf.ByteString getUidBytes(); /** - * optional string path = 2; + * optional string path = 3; * @return Whether the path field is set. */ boolean hasPath(); /** - * optional string path = 2; + * optional string path = 3; * @return The path. */ java.lang.String getPath(); /** - * optional string path = 2; + * optional string path = 3; * @return The bytes for path. */ com.google.protobuf.ByteString getPathBytes(); /** - * optional bytes data = 3; + * optional bytes data = 4; * @return Whether the data field is set. */ boolean hasData(); /** - * optional bytes data = 3; + * optional bytes data = 4; * @return The data. */ com.google.protobuf.ByteString getData(); /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return Whether the type field is set. */ boolean hasType(); /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return The enum numeric value on the wire for type. */ int getTypeValue(); /** - * optional .plus.jdk.websocket.protoc.MessageType type = 4; + * optional .plus.jdk.websocket.protoc.MessageType type = 5; * @return The type. */ plus.jdk.websocket.protoc.MessageType getType();