public class PlayerBoardEventHandler extends BaseEventHandler<PlayerBoardEventBus> {
private final Map<CharacterKeyCDO, PlayerBoardPresenter> cache = new HashMap<CharacterKeyCDO, PlayerBoardPresenter>();
public void onNewPlayerBoard(long campaignId, long characterId, Container<PlayerBoardPresenter> container) {
final CharacterKeyCDO characterKey = new CharacterKeyCDO(campaignId, characterId);
PlayerBoardPresenter playerBoardPresenter = cache.get(characterKey);
if (playerBoardPresenter == null) {
playerBoardPresenter = eventBus.addHandler(PlayerBoardPresenter.class);
cache.put(characterKey, playerBoardPresenter);
playerBoardPresenter.initPlayerBoard(campaignId, characterId);
}
container.set(playerBoardPresenter);
}