Module io.inverno.mod.web.server
Package io.inverno.mod.web.server
Interface Web2SocketExchange<A extends ExchangeContext>
- Type Parameters:
A
- the type of the exchange context
- All Superinterfaces:
BaseWebSocketExchange<A>
,WebSocketExchange<A>
A WebSocket exchange that extends the HTTP server WebSocketExchange
with features for the Web.
It supports inbound and outbound message decoding and encoding based on the negotiated subprotocol which is interpreted as a compact application media types (see
MediaTypes.normalizeApplicationMediaType(java.lang.String)
).
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
ExtendsBaseWebSocketExchange.Inbound
to support WebSocket message decoding.static interface
ExtendsBaseWebSocketExchange.Outbound
to support WebSocket message encoding. -
Method Summary
Methods inherited from interface io.inverno.mod.http.base.ws.BaseWebSocketExchange
close, close, close, close, close, close, context, getSubProtocol
-
Method Details
-
request
WebRequest request()Description copied from interface:WebSocketExchange
Returns the original HTTP upgrade request.
- Specified by:
request
in interfaceWebSocketExchange<A extends ExchangeContext>
- Returns:
- the HTTP request
-
inbound
Web2SocketExchange.Inbound inbound()Description copied from interface:BaseWebSocketExchange
Returns the inbound part of the WebSocket exchange.
This basically corresponds to the stream of WebSocket frames received by the server from the client or by the client from the server.
- Specified by:
inbound
in interfaceBaseWebSocketExchange<A extends ExchangeContext>
- Returns:
- the inbound part
-
outbound
Web2SocketExchange.Outbound outbound()Description copied from interface:BaseWebSocketExchange
Returns the outbound part of the WebSocket exchange.
This basically corresponds to the stream of WebSocket frames sent by the server to the client or by the client to the server.
- Specified by:
outbound
in interfaceBaseWebSocketExchange<A extends ExchangeContext>
- Returns:
- the outbound part
-