Class UserMatchService
java.lang.Object
dev.getelements.elements.service.match.UserMatchService
- All Implemented Interfaces:
MatchService
Created by patricktwohig on 7/20/17.
-
Field Summary
Fields inherited from interface dev.getelements.elements.sdk.service.match.MatchService
EVENT_1V1_MADE
-
Constructor Summary
Constructors -
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.void
setApplicationConfigurationDao
(ApplicationConfigurationDao applicationConfigurationDao) void
setCurrentProfileSupplier
(Supplier<Profile> currentProfileSupplier) void
setMatchDao
(MatchDao matchDao) void
setMatchServiceUtils
(MatchServiceUtils matchServiceUtils) void
setTopicService
(TopicService topicService)
-
Constructor Details
-
UserMatchService
public UserMatchService()
-
-
Method Details
-
getMatch
Description copied from interface:MatchService
Gets theMatch
with the specified id.- Specified by:
getMatch
in interfaceMatchService
- Parameters:
matchId
- the Match ID as specified byMatch.getId()
- Returns:
- the
Match
-
getMatches
Description copied from interface:MatchService
Gets all matches.- Specified by:
getMatches
in interfaceMatchService
- Parameters:
offset
- the offsetcount
- the count- Returns:
- a
Pagination<Match>
instance containing the requested data
-
getMatches
Description copied from interface:MatchService
Gets all matches, specifying search criteria.- Specified by:
getMatches
in interfaceMatchService
- Parameters:
offset
- the offsetcount
- the count- Returns:
- a
Pagination<Match>
instance containing the requested data
-
createMatch
Description copied from interface:MatchService
- Specified by:
createMatch
in interfaceMatchService
- Parameters:
match
- theMatch
object- Returns:
- the
Match
, as it was written to the database
-
attemptRematchAndPoll
public Topic.Subscription attemptRematchAndPoll(String matchId, Consumer<Match> matchConsumer, Consumer<Exception> exceptionConsumer) Description copied from interface:MatchService
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. .- Specified by:
attemptRematchAndPoll
in interfaceMatchService
- Parameters:
matchId
- the match IDMatch.getId()
.matchConsumer
- aConsumer<Match>
used to receive theMatch
instanceexceptionConsumer
- aConsumer<Exception>
used to receive any error encountered in the process- Returns:
- a
Runnable
which may be used to cancel the pending request
-
deleteMatch
Description copied from interface:MatchService
Deletes aMatch
with the supplied ID, as determined byMatch.getId()
.- Specified by:
deleteMatch
in interfaceMatchService
- Parameters:
matchId
- the match ID
-
getCurrentProfileSupplier
-
setCurrentProfileSupplier
-
getMatchDao
-
setMatchDao
-
getTopicService
-
setTopicService
-
getMatchServiceUtils
-
setMatchServiceUtils
-
getApplicationConfigurationDao
-
setApplicationConfigurationDao
@Inject public void setApplicationConfigurationDao(ApplicationConfigurationDao applicationConfigurationDao)
-