public class GroupServiceProvider extends AbstractServiceProvider
InteractiveGroup
gameClient
Constructor and Description |
---|
GroupServiceProvider(GameClient gameClient)
Initializes a new
GroupServiceProvider . |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Boolean> |
create(Collection<InteractiveGroup> groups)
Creates one or more new groups.
|
CompletableFuture<Boolean> |
create(InteractiveGroup... groups)
Creates one or more new groups.
|
CompletableFuture<Boolean> |
delete(String groupID)
Removes a group from the Interactive integration, reassigning any participants who were in that group to the
default group.
|
CompletableFuture<Boolean> |
delete(String groupID,
String reassignGroupID)
Removes a group from the Interactive integration, reassigning any participants who were in that group to a
different one.
|
CompletableFuture<Set<InteractiveGroup>> |
getGroups()
Retrieves all the groups connected to the Interactive integration.
|
CompletableFuture<Set<InteractiveGroup>> |
update(Collection<InteractiveGroup> groups)
Bulk-updates groups that already exist.
|
CompletableFuture<Set<InteractiveGroup>> |
update(int priority,
Collection<InteractiveGroup> groups)
Bulk-updates groups that already exist.
|
CompletableFuture<Set<InteractiveGroup>> |
update(InteractiveGroup... groups)
Bulk-updates groups that already exist.
|
CompletableFuture<Set<InteractiveGroup>> |
update(int priority,
InteractiveGroup... groups)
Bulk-updates groups that already exist.
|
equals, hashCode
public GroupServiceProvider(GameClient gameClient)
GroupServiceProvider
.gameClient
- The GameClient
that owns this service providerpublic CompletableFuture<Set<InteractiveGroup>> getGroups()
Retrieves all the groups connected to the Interactive integration.
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
InteractiveGroups
for the connected Interactive integrationInteractiveGroup
public CompletableFuture<Boolean> create(InteractiveGroup... groups)
Creates one or more new groups. Each group may have an initial scene set, however if one is not set the Interactive service will assign the group to the default scene. Group IDs MUST be unique and not already exist in the Interactive integration.
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
.
groups
- An array of InteractiveGroups
to be createdCompletableFuture
that when complete returns true
if the
create
method call completes with no errorsInteractiveGroup
public CompletableFuture<Boolean> create(Collection<InteractiveGroup> groups)
Creates one or more new groups. Each group may have an initial scene set, however if one is not set the Interactive service will assign the group to the default scene. Group IDs MUST be unique and not already exist in the Interactive integration.
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
.
groups
- A Collection
of InteractiveGroups
to be createdCompletableFuture
that when complete returns true
if the
create
method call completes with no errorsInteractiveGroup
public CompletableFuture<Set<InteractiveGroup>> update(InteractiveGroup... groups)
Bulk-updates groups that already exist. The Interactive service will reply with a set of updated groups.
The Interactive service will either update all the groups provided, or fail in which case NONE of the groups provided will be updated. In no case will the Interactive service apply updates to a subset of groups.
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
.
groups
- An array of InteractiveGroups
to be updatedCompletableFuture
that when complete returns a Set
of updated
InteractiveGroups
InteractiveGroup
public CompletableFuture<Set<InteractiveGroup>> update(int priority, InteractiveGroup... groups)
Bulk-updates groups that already exist. The Interactive service will reply with a set of updated groups.
The Interactive service will either update all the groups provided, or fail in which case NONE of the groups provided will be updated. In no case will the Interactive service apply updates to a subset of groups.
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 updategroups
- An array of InteractiveGroups
to be updatedCompletableFuture
that when complete returns a Set
of updated
InteractiveGroups
InteractiveGroup
public CompletableFuture<Set<InteractiveGroup>> update(Collection<InteractiveGroup> groups)
Bulk-updates groups that already exist. The Interactive service will reply with a set of updated groups.
The Interactive service will either update all the groups provided, or fail in which case NONE of the groups provided will be updated. In no case will the Interactive service apply updates to a subset of groups.
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
.
groups
- A Collection
of InteractiveGroups
to be updatedCompletableFuture
that when complete returns a Set
of updated
InteractiveGroups
InteractiveGroup
public CompletableFuture<Set<InteractiveGroup>> update(int priority, Collection<InteractiveGroup> groups)
Bulk-updates groups that already exist. The Interactive service will reply with a set of updated groups.
The Interactive service will either update all the groups provided, or fail in which case NONE of the groups provided will be updated. In no case will the Interactive service apply updates to a subset of groups.
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 updategroups
- A Collection
of InteractiveGroups
to be updatedCompletableFuture
that when complete returns a Set
of updated
InteractiveGroups
InteractiveGroup
public CompletableFuture<Boolean> delete(String groupID)
Removes a group from the Interactive integration, reassigning any participants who were in that group to the default group. The server MAY not return an error if the group to remove does not exist.
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
.
groupID
- Identifier for an InteractiveGroup
to be deletedCompletableFuture
that when complete returns true
if the
delete
method call completes with no errorsInteractiveGroup
public CompletableFuture<Boolean> delete(String groupID, String reassignGroupID)
Removes a group from the Interactive integration, reassigning any participants who were in that group to a different one. The server MAY not return an error if the group to remove does not exist.
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
.
groupID
- Identifier for an InteractiveGroup
to be deletedreassignGroupID
- Identifier for the InteractiveGroup
participants will be reassigned toCompletableFuture
that when complete returns true
if the
delete
method call completes with no errorsInteractiveGroup
Copyright © 2018. All rights reserved.