public interface WebsocketOutbound extends NettyOutbound
| Modifier and Type | Field and Description |
|---|---|
static java.util.function.Function<? super io.netty.buffer.ByteBuf,? extends io.netty.handler.codec.http.websocketx.WebSocketFrame> |
bytebufToWebsocketFrame |
static java.util.function.Function<? super java.lang.String,? extends io.netty.handler.codec.http.websocketx.WebSocketFrame> |
stringToWebsocketFrame |
FILE_CHUNKED_STRATEGY_BUFFER| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
selectedSubprotocol()
Returns the websocket subprotocol negotiated by the client and server during
the websocket handshake, or null if none was requested.
|
default NettyOutbound |
send(Publisher<? extends io.netty.buffer.ByteBuf> dataStream)
Send data to the peer, listen for any error on write and close on terminal signal
(complete|error).
|
reactor.core.publisher.Mono<java.lang.Void> |
sendClose()
Prepare to send a close frame on subscribe then close the underlying channel
|
reactor.core.publisher.Mono<java.lang.Void> |
sendClose(int rsv)
Prepare to send a close frame on subscribe then close the underlying channel
|
reactor.core.publisher.Mono<java.lang.Void> |
sendClose(int rsv,
int statusCode,
java.lang.String reasonText)
Prepare to send a close frame on subscribe then close the underlying channel
|
reactor.core.publisher.Mono<java.lang.Void> |
sendClose(int statusCode,
java.lang.String reasonText)
Prepare to send a close frame on subscribe then close the underlying channel
|
default NettyOutbound |
sendString(Publisher<? extends java.lang.String> dataStream,
java.nio.charset.Charset charset)
Send String to the peer, listen for any error on write and close on terminal signal
(complete|error).
|
alloc, context, context, getFileChunkedStrategy, neverComplete, onWriteIdle, options, sendByteArray, sendFile, sendFile, sendFileChunked, sendGroups, sendObject, sendObject, sendString, subscribe, then, thenstatic final java.util.function.Function<? super java.lang.String,? extends io.netty.handler.codec.http.websocketx.WebSocketFrame> stringToWebsocketFrame
static final java.util.function.Function<? super io.netty.buffer.ByteBuf,? extends io.netty.handler.codec.http.websocketx.WebSocketFrame> bytebufToWebsocketFrame
java.lang.String selectedSubprotocol()
reactor.core.publisher.Mono<java.lang.Void> sendClose()
Mono fulfilled when the send succeeded or failed, immediately
completed if already closedreactor.core.publisher.Mono<java.lang.Void> sendClose(int rsv)
rsv - reserved bits used for protocol extensionsMono fulfilled when the send succeeded or failed, immediately
completed if already closedreactor.core.publisher.Mono<java.lang.Void> sendClose(int statusCode,
java.lang.String reasonText)
statusCode - Integer status code as per RFC 6455. For
example, 1000 indicates normal closure.reasonText - Reason text. Set to null if no text.Mono fulfilled when the send succeeded or failed, immediately
completed if already closedreactor.core.publisher.Mono<java.lang.Void> sendClose(int rsv,
int statusCode,
java.lang.String reasonText)
rsv - reserved bits used for protocol extensionsstatusCode - Integer status code as per RFC 6455. For
example, 1000 indicates normal closure.reasonText - Reason text. Set to null if no text.Mono fulfilled when the send succeeded or failed, immediately
completed if already closeddefault NettyOutbound send(Publisher<? extends io.netty.buffer.ByteBuf> dataStream)
NettyOutboundA new NettyOutbound type (or the same) for typed send
sequences. An implementor can therefore specialize the Outbound after a first after
a prepending data publisher.
Note: Nesting any send* method is not supported.
send in interface NettyOutbounddataStream - the dataStream publishing OUT items to write on this channelNettyOutbound to append further send. It will emit a complete
signal successful sequence write (e.g. after "flush") or any error during write.default NettyOutbound sendString(Publisher<? extends java.lang.String> dataStream, java.nio.charset.Charset charset)
NettyOutboundsendString in interface NettyOutbounddataStream - the dataStream publishing Buffer items to write on this channelcharset - the encoding charset