Class SubscriptionData
java.lang.Object
live.crowdcontrol.cc4j.websocket.data.SubscriptionData
Defines an attempt to subscribe to channels of information on the WebSocket.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSubscriptionData(@NotNull Set<@NotNull String> topics) Creates a subscription body.SubscriptionData(@NotNull Set<@NotNull String> topics, @Nullable String token) Creates a subscription body.SubscriptionData(@NotNull Set<@NotNull String> topics, @Nullable String token, @Nullable String key) Creates a subscription body. -
Method Summary
-
Field Details
-
TOPIC_PATTERN
- See Also:
-
-
Constructor Details
-
SubscriptionData
public SubscriptionData(@NotNull @NotNull Set<@NotNull String> topics, @Nullable @Nullable String token, @Nullable @Nullable String key) Creates a subscription body.- Parameters:
topics- the list of topics to subscribe to, conforming toTOPIC_PATTERNtoken- the token to authenticate with or nullkey- the overlay key to authenticate with or null
-
SubscriptionData
public SubscriptionData(@NotNull @NotNull Set<@NotNull String> topics, @Nullable @Nullable String token) Creates a subscription body.- Parameters:
topics- the list of topics to subscribe to, conforming toTOPIC_PATTERNtoken- the token to authenticate with or null
-
SubscriptionData
Creates a subscription body.- Parameters:
topics- the list of topics to subscribe to, conforming toTOPIC_PATTERN
-
-
Method Details
-
getTopics
Gets the set of topics to be subscribed to. It is immutable.- Returns:
- topic list
-
getToken
Gets the token to authenticate with.- Returns:
- JWT token
-
getKey
Gets the key to authenticate with. This is given out to lesser third-party applications such as the official Overlay which lacks write permissions.- Returns:
- overlay key
-