Define el contrato de un punto final WebSocket. More...
Public Member Functions | |
| default void | onBinary (final WebSocketSession session, final ByteBuffer message) throws Exception |
| Invocado cuando se recibe un mensaje binario del cliente. | |
| default void | onClose (final WebSocketSession session, final WebSocketCloseStatus closeStatus) throws Exception |
| Invocado cuando el cliente solicita cerrar la conexión. | |
| default void | onError (final WebSocketSession session, final Throwable error) |
| Invocado cuando ocurre un error en la conexión WebSocket. | |
| default void | onOpen (final WebSocketSession session) throws Exception |
| Invocado cuando la conexión WebSocket se abre exitosamente. | |
| default void | onText (final WebSocketSession session, final String message) throws Exception |
| Invocado cuando se recibe un mensaje de texto del cliente. | |
| default Set< String > | subprotocols () |
| Devuelve el conjunto de subprotocolos WebSocket que este endpoint acepta. | |
Define el contrato de un punto final WebSocket.
Las implementaciones reciben notificaciones del ciclo de vida de la conexión: apertura, mensajes de texto/binario, cierre y errores. Todos los métodos tienen una implementación vacía por defecto para que las subclases solo sobreescriban los eventos que necesiten.
Definition at line 38 of file WebSocketEndpoint.java.
| default void dev.rafex.ether.websocket.core.WebSocketEndpoint.onBinary | ( | final WebSocketSession | session, |
| final ByteBuffer | message ) throws Exception |
Invocado cuando se recibe un mensaje binario del cliente.
| session | sesión WebSocket activa |
| message | contenido binario recibido |
| Exception | si ocurre un error durante el procesamiento |
Implemented in dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.
Definition at line 66 of file WebSocketEndpoint.java.
| default void dev.rafex.ether.websocket.core.WebSocketEndpoint.onClose | ( | final WebSocketSession | session, |
| final WebSocketCloseStatus | closeStatus ) throws Exception |
Invocado cuando el cliente solicita cerrar la conexión.
| session | sesión WebSocket activa |
| closeStatus | estado de cierre indicado por el cliente |
| Exception | si ocurre un error durante el procesamiento |
Implemented in dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.
Definition at line 76 of file WebSocketEndpoint.java.
References dev.rafex.ether.websocket.core.WebSocketCloseStatus().
| default void dev.rafex.ether.websocket.core.WebSocketEndpoint.onError | ( | final WebSocketSession | session, |
| final Throwable | error ) |
Invocado cuando ocurre un error en la conexión WebSocket.
| session | sesión WebSocket activa |
| error | excepción que causó el error |
Implemented in dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.
Definition at line 85 of file WebSocketEndpoint.java.
| default void dev.rafex.ether.websocket.core.WebSocketEndpoint.onOpen | ( | final WebSocketSession | session | ) | throws Exception |
Invocado cuando la conexión WebSocket se abre exitosamente.
| session | sesión WebSocket activa |
| Exception | si ocurre un error durante el procesamiento |
Implemented in dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.
Definition at line 46 of file WebSocketEndpoint.java.
| default void dev.rafex.ether.websocket.core.WebSocketEndpoint.onText | ( | final WebSocketSession | session, |
| final String | message ) throws Exception |
Invocado cuando se recibe un mensaje de texto del cliente.
| session | sesión WebSocket activa |
| message | contenido de texto recibido |
| Exception | si ocurre un error durante el procesamiento |
Implemented in dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.
Definition at line 56 of file WebSocketEndpoint.java.
| default Set< String > dev.rafex.ether.websocket.core.WebSocketEndpoint.subprotocols | ( | ) |
Devuelve el conjunto de subprotocolos WebSocket que este endpoint acepta.
El servidor seleccionará un subprotocolo de esta lista durante el handshake.
Implemented in dev.rafex.ether.glowroot.jetty12.GlowrootWebSocketEndpointWrapper.
Definition at line 94 of file WebSocketEndpoint.java.