Record Class WebsocketConnectionOptions
java.lang.Object
java.lang.Record
io.fluxzero.sdk.common.websocket.WebsocketConnectionOptions
- Record Components:
headers- request headers to add to the WebSocket opening handshakeuserProperties- mutable session metadata that should be available to endpoint callbacks after the session opensconnectTimeout- optional timeout for establishing the WebSocket connectionsubprotocols- optional WebSocket subprotocols to advertise, ordered by preference
public record WebsocketConnectionOptions(Map<String, List<String>> headers, Map<String,Object> userProperties, Duration connectTimeout, List<String> subprotocols)
extends Record
Connection settings for the low-level runtime websocket connector.
The collections passed to this record are defensively copied. Header names are passed through unchanged because the underlying connector forwards them to the runtime handshake as supplied.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectTimeoutrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.Returns the value of thesubprotocolsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserPropertiesrecord component.
-
Constructor Details
-
WebsocketConnectionOptions
public WebsocketConnectionOptions(Map<String, List<String>> headers, Map<String, Object> userProperties, Duration connectTimeout, List<String> subprotocols) Creates an instance of aWebsocketConnectionOptionsrecord class.- Parameters:
headers- the value for theheadersrecord componentuserProperties- the value for theuserPropertiesrecord componentconnectTimeout- the value for theconnectTimeoutrecord componentsubprotocols- the value for thesubprotocolsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
headers
-
userProperties
Returns the value of theuserPropertiesrecord component.- Returns:
- the value of the
userPropertiesrecord component
-
connectTimeout
Returns the value of theconnectTimeoutrecord component.- Returns:
- the value of the
connectTimeoutrecord component
-
subprotocols
Returns the value of thesubprotocolsrecord component.- Returns:
- the value of the
subprotocolsrecord component
-