Annotation Type OnWebSocketMessage
-
@Documented @Retention(RUNTIME) @Target(METHOD) public @interface OnWebSocketMessageAnnotation for tagging methods to receive Binary or Text Message events.Acceptable method patterns.
Note:methodNamecan be any name you want to use.Text Message Versions
public void methodName(String text)public void methodName(Sessionsession, String text)public void methodName(Reader reader)public void methodName(Sessionsession, Reader reader)
Readerin this case will always use UTF-8 encoding/charset (this is dictated by the RFC 6455 spec for Text Messages. If you need to use a non-UTF-8 encoding/charset, you are instructed to use the binary messaging techniques.Binary Message Versions