@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface OnWebSocketMessage
Acceptable method patterns.
Note: methodName
can be any name you want to use.
Text Message Versions
public void methodName(String text)
public void methodName(WebSocketConnection
conn, String text)
public void methodName(Reader reader)
public void methodName(WebSocketConnection
conn, Reader reader)
Reader
in 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
public void methodName(byte buf[], int offset, int length)
public void methodName(WebSocketConnection
conn, byte buf[], int offset, int length)
public void methodName(InputStream stream)
public void methodName(WebSocketConnection
conn, InputStream stream)
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.