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 aMatchto be updated by another request.createMatch(Match match) Creates aMatch.voiddeleteMatch(String matchId) Deletes aMatchwith the supplied ID, as determined byMatch.getId().Gets theMatchwith the specified id.getMatches(int offset, int count) Gets all matches.getMatches(int offset, int count, String search) Gets all matches, specifying search criteria.voidsetApplicationConfigurationDao(ApplicationConfigurationDao applicationConfigurationDao) voidsetCurrentProfileSupplier(Supplier<Profile> currentProfileSupplier) voidsetMatchDao(MatchDao matchDao) voidsetMatchServiceUtils(MatchServiceUtils matchServiceUtils) voidsetTopicService(TopicService topicService)
-
Constructor Details
-
UserMatchService
public UserMatchService()
-
-
Method Details
-
getMatch
Description copied from interface:MatchServiceGets theMatchwith the specified id.- Specified by:
getMatchin interfaceMatchService- Parameters:
matchId- the Match ID as specified byMatch.getId()- Returns:
- the
Match
-
getMatches
Description copied from interface:MatchServiceGets all matches.- Specified by:
getMatchesin interfaceMatchService- Parameters:
offset- the offsetcount- the count- Returns:
- a
Pagination<Match>instance containing the requested data
-
getMatches
Description copied from interface:MatchServiceGets all matches, specifying search criteria.- Specified by:
getMatchesin interfaceMatchService- Parameters:
offset- the offsetcount- the count- Returns:
- a
Pagination<Match>instance containing the requested data
-
createMatch
Description copied from interface:MatchService- Specified by:
createMatchin interfaceMatchService- Parameters:
match- theMatchobject- 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:MatchServiceWaits for aMatchto be updated by another request. Upon update, this will pass the update into the supplied suppliedConsumer. In the event theMatchhas been deleted, theConsumerwill receive a null value indicating so. The returnedSubscriptionneed not be closed, unless explicitly requesting un-subscription.- Specified by:
attemptRematchAndPollin interfaceMatchService- Parameters:
matchId- the match IDMatch.getId().matchConsumer- aConsumer<Match>used to receive theMatchinstanceexceptionConsumer- aConsumer<Exception>used to receive any error encountered in the process- Returns:
- a
Runnablewhich may be used to cancel the pending request
-
deleteMatch
Description copied from interface:MatchServiceDeletes aMatchwith the supplied ID, as determined byMatch.getId().- Specified by:
deleteMatchin interfaceMatchService- Parameters:
matchId- the match ID
-
getCurrentProfileSupplier
-
setCurrentProfileSupplier
-
getMatchDao
-
setMatchDao
-
getTopicService
-
setTopicService
-
getMatchServiceUtils
-
setMatchServiceUtils
-
getApplicationConfigurationDao
-
setApplicationConfigurationDao
@Inject public void setApplicationConfigurationDao(ApplicationConfigurationDao applicationConfigurationDao)
-