getGatewayClient
public GatewayClient getGatewayClient(HttpClient httpClient,
PayloadReader payloadReader,
PayloadWriter payloadWriter,
RetryOptions retryOptions,
String token,
IdentifyOptions identifyOptions,
GatewayObserver observer,
PayloadTransformer identifyLimiter)
Create
GatewayClient objects, supporting real-time events from Discord.
- Specified by:
getGatewayClient in interface GatewayClientFactory
- Parameters:
httpClient - a Reactor Netty HttpClient to use in the created client
payloadReader - a deserialization strategy to received payloads
payloadWriter - a serialization strategy to sent payloads
retryOptions - a configurable reconnection policy
token - an authorization token to log into Discord Gateway
identifyOptions - a configurable set of shard and presence parameters
observer - a hook that listens to many gateway lifecycle events
identifyLimiter - a rate-limiting policy to coordinate identify requests
- Returns:
- a client allowing communication with Discord Gateway