Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper Class Reference

Decorator that instruments a WebSocketEndpoint with Glowroot APM. More...

Inheritance diagram for dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper:
Collaboration diagram for dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper:

Public Member Functions

 GlowrootWebSocketEndpointWrapper (final WebSocketEndpoint delegate)
void onBinary (final WebSocketSession session, final ByteBuffer message) throws Exception
 Invocado cuando se recibe un mensaje binario del cliente.
void onClose (final WebSocketSession session, final WebSocketCloseStatus closeStatus) throws Exception
 Invocado cuando el cliente solicita cerrar la conexión.
void onError (final WebSocketSession session, final Throwable error)
 Invocado cuando ocurre un error en la conexión WebSocket.
void onOpen (final WebSocketSession session) throws Exception
 Invocado cuando la conexión WebSocket se abre exitosamente.
void onText (final WebSocketSession session, final String message) throws Exception
 Invocado cuando se recibe un mensaje de texto del cliente.
Set< String > subprotocols ()
 Devuelve el conjunto de subprotocolos WebSocket que este endpoint acepta.

Detailed Description

Decorator that instruments a WebSocketEndpoint with Glowroot APM.

Wraps every WebSocket lifecycle event (open, text, binary, close, error) and records it as a Glowroot "WebSocket" transaction, tagging each one with the session id, path, and event-specific metadata.

Usage — wrap the endpoint before registering it:


routeRegistry.add(WebSocketRoute.of("/ws/chat", new GlowrootWebSocketEndpointWrapper(new ChatEndpoint())));

Definition at line 55 of file GlowrootWebSocketEndpointWrapper.java.

Constructor & Destructor Documentation

◆ GlowrootWebSocketEndpointWrapper()

dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.GlowrootWebSocketEndpointWrapper ( final WebSocketEndpoint delegate)

Definition at line 59 of file GlowrootWebSocketEndpointWrapper.java.

Member Function Documentation

◆ onBinary()

void dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.onBinary ( final WebSocketSession session,
final ByteBuffer message ) throws Exception

Invocado cuando se recibe un mensaje binario del cliente.

Parameters
sessionsesión WebSocket activa
messagecontenido binario recibido
Exceptions
Exceptionsi ocurre un error durante el procesamiento

Implements dev.rafex.ether.websocket.core.WebSocketEndpoint.

Definition at line 89 of file GlowrootWebSocketEndpointWrapper.java.

◆ onClose()

void dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.onClose ( final WebSocketSession session,
final WebSocketCloseStatus closeStatus ) throws Exception

Invocado cuando el cliente solicita cerrar la conexión.

Parameters
sessionsesión WebSocket activa
closeStatusestado de cierre indicado por el cliente
Exceptions
Exceptionsi ocurre un error durante el procesamiento

Implements dev.rafex.ether.websocket.core.WebSocketEndpoint.

Definition at line 101 of file GlowrootWebSocketEndpointWrapper.java.

◆ onError()

void dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.onError ( final WebSocketSession session,
final Throwable error )

Invocado cuando ocurre un error en la conexión WebSocket.

Parameters
sessionsesión WebSocket activa
errorexcepción que causó el error

Implements dev.rafex.ether.websocket.core.WebSocketEndpoint.

Definition at line 115 of file GlowrootWebSocketEndpointWrapper.java.

◆ onOpen()

void dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.onOpen ( final WebSocketSession session) throws Exception

Invocado cuando la conexión WebSocket se abre exitosamente.

Parameters
sessionsesión WebSocket activa
Exceptions
Exceptionsi ocurre un error durante el procesamiento

Implements dev.rafex.ether.websocket.core.WebSocketEndpoint.

Definition at line 67 of file GlowrootWebSocketEndpointWrapper.java.

◆ onText()

void dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.onText ( final WebSocketSession session,
final String message ) throws Exception

Invocado cuando se recibe un mensaje de texto del cliente.

Parameters
sessionsesión WebSocket activa
messagecontenido de texto recibido
Exceptions
Exceptionsi ocurre un error durante el procesamiento

Implements dev.rafex.ether.websocket.core.WebSocketEndpoint.

Definition at line 77 of file GlowrootWebSocketEndpointWrapper.java.

◆ subprotocols()

Set< String > dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.subprotocols ( )

Devuelve el conjunto de subprotocolos WebSocket que este endpoint acepta.

El servidor seleccionará un subprotocolo de esta lista durante el handshake.

Returns
conjunto de nombres de subprotocolo soportados; vacío por defecto

Implements dev.rafex.ether.websocket.core.WebSocketEndpoint.

Definition at line 129 of file GlowrootWebSocketEndpointWrapper.java.


The documentation for this class was generated from the following file: