I am trying to use websockets in java and I am coming across this issue:
Cannot call method public final void package.ClientWebSocket#jettyOnMessage(byte[], int, int) with args: [[B, java.lang.Integer, java.lang.Integer]
Here is the code snippet that is actually being called
@OnWebSocketMessage
public final void jettyOnMessage(final byte[] data, final int offset, final int length) {
onMessage(ByteBuffer.wrap(data, offset, length));
}
Here is there documentation that describes what the method signature should be:
* <u>Binary Message Versions</u>
* <ol>
* <li><code>public void methodName(byte buf[], int offset, int length)</code></li>
* <li><code>public void methodName({@link Session} session, byte buf[], int offset, int length)</code></li>
* <li><code>public void methodName(InputStream stream)</code></li>
* <li><code>public void methodName({@link Session} session, InputStream stream)</code></li>
* </ol>
*/
As you can tell I am using the first version of the call. What am I doing wrong?
Edit1:
I made the method non final and that did not change anything.