- Enclosing class:
WebSocket
@Target(METHOD)
@Retention(CLASS)
@Documented
@Inherited
@Singleton
public static @interface WebSocket.OnMessage
A message listener method. There can be maximally two methods on a service with this annotation, and they must
use different message type (i.e. one method max for binary, and one method max for string messages).
The following parameters are supported for any kind of message (binary and text):
boolean- without any qualifier, determining whether the message is the last one (optional, if not specified, message is always delivered in full); this parameter must be the LAST parameter of the method.
BufferDataByteBufferbyte[]InputStream- this method will be invoked on a separate virtual thread