public class ParticipantServiceProvider extends AbstractServiceProvider
InteractiveParticipantgameClient| Constructor and Description |
|---|
ParticipantServiceProvider(GameClient gameClient)
Initializes a new
ParticipantServiceProvider. |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Set<InteractiveParticipant>> |
getActiveParticipants(long thresholdTimestamp)
Retrieves all of the currently connected participants who have given input after the specified threshold time,
where the threshold is given as a UTC unix timestamp (in milliseconds), in ascending order by the time they last
gave input.
|
CompletableFuture<Set<InteractiveParticipant>> |
getAllParticipants()
Retrieves all of the participants that are currently connected to the Interactive integration that this client
is connected to, in ascending order by the time they connected.
|
CompletableFuture<Set<InteractiveParticipant>> |
update(Collection<InteractiveParticipant> participants)
Bulk-updates a collection of participants.
|
CompletableFuture<Set<InteractiveParticipant>> |
update(int priority,
Collection<InteractiveParticipant> participants)
Bulk-updates a collection of participants.
|
CompletableFuture<Set<InteractiveParticipant>> |
update(InteractiveParticipant... participants)
Bulk-updates a collection of participants.
|
CompletableFuture<Set<InteractiveParticipant>> |
update(int priority,
InteractiveParticipant... participants)
Bulk-updates a collection of participants.
|
equals, hashCodepublic ParticipantServiceProvider(GameClient gameClient)
ParticipantServiceProvider.gameClient - The GameClient that owns this service providerpublic CompletableFuture<Set<InteractiveParticipant>> getAllParticipants()
Retrieves all of the participants that are currently connected to the Interactive integration that this client is connected to, in ascending order by the time they connected.
The result of the CompletableFuture may include checked exceptions that were thrown in the event
that there was a problem with the reply from the Interactive service. Specifically, two types of checked
exceptions may be thrown:
InteractiveRequestNoReplyException may be thrown if no reply is received from the Interactive
service.InteractiveReplyWithErrorException may be thrown if the reply received from the Interactive service
contains an InteractiveError.Considerations should be made for these possibilities when interpreting the results of the returned
CompletableFuture.
CompletableFuture that when complete returns a Set of all
InteractiveParticipants connected to the Interactive integrationInteractiveParticipantpublic CompletableFuture<Set<InteractiveParticipant>> getActiveParticipants(long thresholdTimestamp)
Retrieves all of the currently connected participants who have given input after the specified threshold time, where the threshold is given as a UTC unix timestamp (in milliseconds), in ascending order by the time they last gave input.
The result of the CompletableFuture may include checked exceptions that were thrown in the event
that there was a problem with the reply from the Interactive service. Specifically, two types of checked
exceptions may be thrown:
InteractiveRequestNoReplyException may be thrown if no reply is received from the Interactive
service.InteractiveReplyWithErrorException may be thrown if the reply received from the Interactive service
contains an InteractiveError.Considerations should be made for these possibilities when interpreting the results of the returned
CompletableFuture.
thresholdTimestamp - A UTC unix timestamp (in milliseconds)CompletableFuture that when complete returns a Set of
InteractiveParticipants connected to the Interactive integration
that have given input since the provided thresholdInteractiveParticipantpublic CompletableFuture<Set<InteractiveParticipant>> update(InteractiveParticipant... participants)
Bulk-updates a collection of participants. The Interactive service will reply with a set of updated participants.
The Interactive service will either update all the participants provided, or fail in which case NONE of the participants provided will be updated. In no case will the Interactive service apply updates to a subset of participants. If a provided participant is not connected to the integration, the update to that participant will be ignored.
The result of the CompletableFuture may include checked exceptions that were thrown in the event
that there was a problem with the reply from the Interactive service. Specifically, two types of checked
exceptions may be thrown:
InteractiveRequestNoReplyException may be thrown if no reply is received from the Interactive
service.InteractiveReplyWithErrorException may be thrown if the reply received from the Interactive service
contains an InteractiveError.Considerations should be made for these possibilities when interpreting the results of the returned
CompletableFuture.
participants - An array of InteractiveParticipants to be updatedCompletableFuture that when complete returns a Set of updated
InteractiveParticipantsInteractiveParticipantpublic CompletableFuture<Set<InteractiveParticipant>> update(int priority, InteractiveParticipant... participants)
Bulk-updates a collection of participants. The Interactive service will reply with a set of updated participants.
The Interactive service will either update all the participants provided, or fail in which case NONE of the participants provided will be updated. In no case will the Interactive service apply updates to a subset of participants. If a provided participant is not connected to the integration, the update to that participant will be ignored.
The result of the CompletableFuture may include checked exceptions that were thrown in the event
that there was a problem with the reply from the Interactive service. Specifically, two types of checked
exceptions may be thrown:
InteractiveRequestNoReplyException may be thrown if no reply is received from the Interactive
service.InteractiveReplyWithErrorException may be thrown if the reply received from the Interactive service
contains an InteractiveError.Considerations should be made for these possibilities when interpreting the results of the returned
CompletableFuture.
priority - The priority value for the updateparticipants - An array of InteractiveParticipants to be updatedCompletableFuture that when complete returns a Set of updated
InteractiveParticipantsInteractiveParticipantpublic CompletableFuture<Set<InteractiveParticipant>> update(Collection<InteractiveParticipant> participants)
Bulk-updates a collection of participants. The Interactive service will reply with a set of updated participants.
The Interactive service will either update all the participants provided, or fail in which case NONE of the participants provided will be updated. In no case will the Interactive service apply updates to a subset of participants. If a provided participant is not connected to the integration, the update to that participant will be ignored.
The result of the CompletableFuture may include checked exceptions that were thrown in the event
that there was a problem with the reply from the Interactive service. Specifically, two types of checked
exceptions may be thrown:
InteractiveRequestNoReplyException may be thrown if no reply is received from the Interactive
service.InteractiveReplyWithErrorException may be thrown if the reply received from the Interactive service
contains an InteractiveError.Considerations should be made for these possibilities when interpreting the results of the returned
CompletableFuture.
participants - A Collection of InteractiveParticipants to be updatedCompletableFuture that when complete returns a Set of updated
InteractiveParticipantsInteractiveParticipantpublic CompletableFuture<Set<InteractiveParticipant>> update(int priority, Collection<InteractiveParticipant> participants)
Bulk-updates a collection of participants. The Interactive service will reply with a set of updated participants.
The Interactive service will either update all the participants provided, or fail in which case NONE of the participants provided will be updated. In no case will the Interactive service apply updates to a subset of participants. If a provided participant is not connected to the integration, the update to that participant will be ignored.
The result of the CompletableFuture may include checked exceptions that were thrown in the event
that there was a problem with the reply from the Interactive service. Specifically, two types of checked
exceptions may be thrown:
InteractiveRequestNoReplyException may be thrown if no reply is received from the Interactive
service.InteractiveReplyWithErrorException may be thrown if the reply received from the Interactive service
contains an InteractiveError.Considerations should be made for these possibilities when interpreting the results of the returned
CompletableFuture.
priority - The priority value for the updateparticipants - A Collection of InteractiveParticipants to be updatedCompletableFuture that when complete returns a Set of updated
InteractiveParticipantsInteractiveParticipantCopyright © 2018. All rights reserved.