Top Description Inners Methods
reactor.netty.http.websocket

public Interface WebsocketSpec

Known Direct Subinterfaces
reactor.netty.http.client.WebsocketClientSpec, reactor.netty.http.server.WebsocketServerSpec
Known Direct Implementers
reactor.netty.http.websocket.WebsocketSpecImpl
Imports
reactor.util.annotation.Nullable, java.util.Objects, java.util.function.Supplier

Wrapper for websocket configuration.
Authors
Dmitrii Borin, Violeta Georgieva
Since
0.9.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

returns whether the websocket compression extension is enabled.
compress
()

Returns whether the websocket compression extension is enabled.

public boolean

Returns:

returns whether to proxy websocket PING frames or respond to them.
handlePing
()

Returns whether to proxy websocket PING frames or respond to them.

public int

Returns:

returns the configured maximum allowable frame payload length.
maxFramePayloadLength
()

Returns the configured maximum allowable frame payload length.

public String

Returns:

returns the configured sub protocols.
protocols
()

Returns the configured sub protocols.

Method Detail

compressback to summary
public boolean compress()

Returns whether the websocket compression extension is enabled.

Returns:boolean

returns whether the websocket compression extension is enabled.

handlePingback to summary
public boolean handlePing()

Returns whether to proxy websocket PING frames or respond to them.

Returns:boolean

returns whether to proxy websocket PING frames or respond to them.

maxFramePayloadLengthback to summary
public int maxFramePayloadLength()

Returns the configured maximum allowable frame payload length.

Returns:int

returns the configured maximum allowable frame payload length.

protocolsback to summary
public String protocols()

Returns the configured sub protocols.

Returns:String

returns the configured sub protocols.

Annotations
@Nullable
reactor.netty.http.websocket back to summary

public Class WebsocketSpec.Builder<SPEC extends WebsocketSpec.Builder<SPEC>>

extends Object
implements Supplier<SPEC extends WebsocketSpec.Builder<SPEC>>
Class Inheritance
All Implemented Interfaces
java.util.function.Supplier
Known Direct Subclasses
reactor.netty.http.client.WebsocketClientSpec.Builder, reactor.netty.http.server.WebsocketServerSpec.Builder

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv boolean
pack-priv int
pack-priv String

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public final SPEC

Returns:

this
compress
(boolean
whether the websocket compression extension is enabled if the client request presents websocket extensions headers.
compress
)

Sets flag whether the websocket compression extension is enabled if the client request presents websocket extensions headers.

public SPEC
get()

Implements java.util.function.Supplier.get.

Gets a result.
public final SPEC

Returns:

this
handlePing
(boolean
whether to proxy websocket ping frames or respond to them
handlePing
)

Sets flag whether to proxy websocket ping frames or respond to them.

public final SPEC

Returns:

this
maxFramePayloadLength
(int
maximum allowable frame payload length
maxFramePayloadLength
)

Sets specifies a custom maximum allowable frame payload length.

public final SPEC

Returns:

this
protocols
(String
sub-protocol
protocols
)

Sets sub-protocol to use in websocket handshake signature.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

compressback to summary
pack-priv boolean compress
handlePingback to summary
pack-priv boolean handlePing
maxFramePayloadLengthback to summary
pack-priv int maxFramePayloadLength
protocolsback to summary
pack-priv String protocols

Constructor Detail

Builderback to summary
protected Builder()

Method Detail

compressback to summary
public final SPEC compress(boolean compress)

Sets flag whether the websocket compression extension is enabled if the client request presents websocket extensions headers. By default, compression is disabled.

Parameters
compress:boolean

whether the websocket compression extension is enabled if the client request presents websocket extensions headers.

Returns:SPEC

this

getback to summary
public SPEC get()

Implements java.util.function.Supplier.get.

Doc from java.util.function.Supplier.get.

Gets a result.

Returns:SPEC

a result

Annotations
@Override
@SuppressWarnings:unchecked
handlePingback to summary
public final SPEC handlePing(boolean handlePing)

Sets flag whether to proxy websocket ping frames or respond to them. False by default.

Parameters
handlePing:boolean

whether to proxy websocket ping frames or respond to them

Returns:SPEC

this

maxFramePayloadLengthback to summary
public final SPEC maxFramePayloadLength(int maxFramePayloadLength)

Sets specifies a custom maximum allowable frame payload length. 65536 by default.

Parameters
maxFramePayloadLength:int

maximum allowable frame payload length

Returns:SPEC

this

Exceptions
IllegalArgumentException:
if maxFramePayloadLength is negative
protocolsback to summary
public final SPEC protocols(String protocols)

Sets sub-protocol to use in websocket handshake signature. Null by default.

Parameters
protocols:String

sub-protocol

Returns:SPEC

this

Exceptions
NullPointerException:
if protocols is null