KrossbowInstrumentation

An interface to hook some pieces of code in different places of internal Krossbow execution. This is primarily meant for monitoring, logging or debugging.

Functions

Link copied to clipboard
open suspend fun onFrameDecoded(originalFrame: WebSocketFrame, decodedFrame: StompFrame)

Called right after successfully decoding a websocket frame into a STOMP frame. This callback is called even for STOMP ERROR frames (before failure).

Link copied to clipboard
open suspend fun onStompFrameSent(frame: StompFrame)

Called right after successfully sending a STOMP frame to the server.

Link copied to clipboard
open suspend fun onWebSocketClientError(exception: Throwable)

Called if some exception is thrown by the websocket client.

Link copied to clipboard
open suspend fun onWebSocketClosed(cause: Throwable?)

Called after the websocket is closed.

Link copied to clipboard
open suspend fun onWebSocketFrameReceived(frame: WebSocketFrame)

Called upon reception of every websocket frame.

Link copied to clipboard
open operator fun plus(instrumentation: KrossbowInstrumentation): KrossbowInstrumentation

Returns a new instrumentation chain that runs this instrumentation and the given instrumentation in each callback.