Interface MatchService
- All Known Implementing Classes:
UserMatchService
public interface MatchService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionattemptRematchAndPoll
(String matchId, Consumer<Match> matchConsumer, Consumer<Exception> exceptionConsumer) Waits for aMatch
to be updated by another request.createMatch
(Match match) Creates aMatch
.void
deleteMatch
(String matchId) Deletes aMatch
with the supplied ID, as determined byMatch.getId()
.Gets theMatch
with the specified id.getMatches
(int offset, int count) Gets all matches.getMatches
(int offset, int count, String search) Gets all matches, specifying search criteria.
-
Field Details
-
EVENT_1V1_MADE
A match-made event. Indicates that a 1v1 quick match was made.- See Also:
-
-
Method Details
-
getMatch
Gets theMatch
with the specified id.- Parameters:
matchId
- the Match ID as specified byMatch.getId()
- Returns:
- the
Match
-
getMatches
Gets all matches.- Parameters:
offset
- the offsetcount
- the count- Returns:
- a
Pagination<Match>
instance containing the requested data
-
getMatches
Gets all matches, specifying search criteria.- Parameters:
offset
- the offsetcount
- the count- Returns:
- a
Pagination<Match>
instance containing the requested data
-
createMatch
-
deleteMatch
Deletes aMatch
with the supplied ID, as determined byMatch.getId()
.- Parameters:
matchId
- the match ID
-
attemptRematchAndPoll
Topic.Subscription attemptRematchAndPoll(String matchId, Consumer<Match> matchConsumer, Consumer<Exception> exceptionConsumer) Waits for aMatch
to be updated by another request. Upon update, this will pass the update into the supplied suppliedConsumer
. In the event theMatch
has been deleted, theConsumer
will receive a null value indicating so. The returnedSubscription
need not be closed, unless explicitly requesting un-subscription. .
-