Created
August 7, 2017 09:36
-
-
Save drawers/2ae521ea2a59c477934a2bba4c0dbffa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ProducerModule(includes = { PlayerRepositoryModule.class, GamesRepositoryModule.class, PlayerNameModule.class } ) | |
final class MainRequestModule { | |
@Produces | |
static ListenableFuture<Player> player(PlayerRepository playerRepository, String playerName) { | |
return playerRepository.retrieve(playerName); | |
} | |
@Produces | |
static ListenableFuture<Games> games(GamesRepository gamesRepository, Player player) { | |
return gamesRepository.retrieve(player.id()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment