public class GatewayResources extends Object
GatewayClient
instances.Constructor and Description |
---|
GatewayResources(StateView stateView,
EventDispatcher eventDispatcher,
ShardCoordinator shardCoordinator,
MemberRequestFilter memberRequestFilter,
GatewayReactorResources gatewayReactorResources,
VoiceReactorResources voiceReactorResources,
ReconnectOptions voiceReconnectOptions,
discord4j.discordjson.possible.Possible<IntentSet> intents)
Create a new
GatewayResources with the given parameters. |
Modifier and Type | Method and Description |
---|---|
EventDispatcher |
getEventDispatcher()
Distributes events to subscribers.
|
GatewayReactorResources |
getGatewayReactorResources()
Return the
GatewayReactorResources used to perform Gateway-related operations. |
discord4j.discordjson.possible.Possible<IntentSet> |
getIntents()
|
MemberRequestFilter |
getMemberRequestFilter()
Return a
MemberRequestFilter indicating whether this shard group should be requesting guild members. |
ShardCoordinator |
getShardCoordinator()
Returns the
ShardCoordinator that is capable of coordinating certain shard actions. |
StateView |
getStateView()
Repository aggregate view of all caching related operations.
|
VoiceReactorResources |
getVoiceReactorResources()
Return the
VoiceReactorResources used to perform Voice Gateway-related operations. |
ReconnectOptions |
getVoiceReconnectOptions()
Return the reconnect policy used to retry a connection to the Voice Gateway.
|
public GatewayResources(StateView stateView, EventDispatcher eventDispatcher, ShardCoordinator shardCoordinator, MemberRequestFilter memberRequestFilter, GatewayReactorResources gatewayReactorResources, VoiceReactorResources voiceReactorResources, ReconnectOptions voiceReconnectOptions, discord4j.discordjson.possible.Possible<IntentSet> intents)
GatewayResources
with the given parameters.stateView
- a read-only facade for an entity cache based off StateHolder
eventDispatcher
- an event bus dedicated to distribute Event
instancesshardCoordinator
- a middleware component to coordinate multiple shard-connecting effortsmemberRequestFilter
- a strategy to determine whether guild members should be requestedgatewayReactorResources
- a custom set of Reactor resources targeting Gateway operationsvoiceReactorResources
- a set of Reactor resources targeting Voice Gateway operationsvoiceReconnectOptions
- a reconnection policy for Voice Gateway connectionspublic discord4j.discordjson.possible.Possible<IntentSet> getIntents()
IntentSet
tied to this GatewayResources
public StateView getStateView()
StateView
is a read-only facade for
StateHolder
which is the mediator for the underlying Store
instances for each cached entity.StateView
tied to this GatewayResources
public EventDispatcher getEventDispatcher()
EventDispatcher
is capable of distributing
events from all GatewayClient
connections (shards) that were specified when this
GatewayDiscordClient
was created.EventDispatcher
tied to this GatewayResources
public ShardCoordinator getShardCoordinator()
ShardCoordinator
that is capable of coordinating certain shard actions.ShardCoordinator
tied to this GatewayResources
public MemberRequestFilter getMemberRequestFilter()
MemberRequestFilter
indicating whether this shard group should be requesting guild members.MemberRequestFilter
configured in this GatewayResources
public GatewayReactorResources getGatewayReactorResources()
GatewayReactorResources
used to perform Gateway-related operations.public VoiceReactorResources getVoiceReactorResources()
VoiceReactorResources
used to perform Voice Gateway-related operations.public ReconnectOptions getVoiceReconnectOptions()