Annotation Interface OnPingMessage


@Retention(RUNTIME) @Target(METHOD) public @interface OnPingMessage
WebSocket and WebSocketClient endpoint methods annotated with this annotation consume ping messages. An endpoint may declare at most one method annotated with this annotation.

Execution model

  • Methods annotated with RunOnVirtualThread are considered blocking and should be executed on a virtual thread.
  • Methods annotated with Blocking are considered blocking and should be executed on a worker thread.
  • Methods annotated with NonBlocking are considered non-blocking and should be executed on an event loop thread.
Execution model for methods which don't declare any of the annotation listed above is derived from the return type:

  • Methods returning void are considered blocking and should be executed on a worker thread.
  • Methods returning io.smallrye.mutiny.Uni<Void> are considered non-blocking and should be executed on an event loop thread.

Method parameters

The method must accept exactly one ping message parameter represented as a Buffer. The method may also accept the following parameters: