WebSocketParam增加getAnnotations系列方法

This commit is contained in:
Redkale
2019-06-19 15:47:46 +08:00
parent 1bda2f92b9
commit 95c3354fcd
3 changed files with 78 additions and 3 deletions

View File

@@ -6,7 +6,8 @@
package org.redkale.test.wsdync;
import java.io.Serializable;
import java.util.Map;
import java.lang.annotation.Annotation;
import java.util.*;
import java.util.function.BiConsumer;
import javax.annotation.Resource;
import org.redkale.convert.ConvertDisabled;
@@ -70,6 +71,9 @@ public final class _DyncChatWebSocketServlet extends WebSocketServlet {
@ConvertDisabled
public _DyncChatWebSocket _redkale_websocket;
@ConvertDisabled
public static Annotation[] _redkale_annotations;
@Override
public String[] getNames() {
return new String[]{"message", "extmap"};
@@ -82,6 +86,12 @@ public final class _DyncChatWebSocketServlet extends WebSocketServlet {
return null;
}
@Override
public Annotation[] getAnnotations() {
if (_redkale_annotations == null) return new Annotation[0];
return Arrays.copyOf(_redkale_annotations, _redkale_annotations.length);
}
public void execute(_DyncChatWebSocket websocket) {
this._redkale_websocket = websocket;
websocket.preOnMessage("sendmessage", this, this);
@@ -105,6 +115,9 @@ public final class _DyncChatWebSocketServlet extends WebSocketServlet {
@ConvertDisabled
public _DyncChatWebSocket _redkale_websocket;
@ConvertDisabled
public static Annotation[] _redkale_annotations;
@Override
public String[] getNames() {
return new String[]{"roomid"};
@@ -116,6 +129,12 @@ public final class _DyncChatWebSocketServlet extends WebSocketServlet {
return null;
}
@Override
public Annotation[] getAnnotations() {
if (_redkale_annotations == null) return new Annotation[0];
return Arrays.copyOf(_redkale_annotations, _redkale_annotations.length);
}
public void execute(_DyncChatWebSocket websocket) {
this._redkale_websocket = websocket;
websocket.preOnMessage("joinroom", this, this);