Package match.aggregate

Examples of match.aggregate.Match


        players.add(new PlayerModel(UUID.randomUUID(), "piet", PlayerState.playing));
        players.add(new PlayerModel(UUID.randomUUID(), "klaas", PlayerState.playing));
        players.add(new PlayerModel(UUID.randomUUID(), "frank", PlayerState.playing));
        players.add(new PlayerModel(UUID.randomUUID(), "henk", PlayerState.playing));

        Match match = new Match(matchId, players);

        return new SoccerMatchModel(players, match);
    }
View Full Code Here


        Iterator<Event> iterator = eventStream.iterator();
        CreatedMatchEvent createdMatchEvent = (CreatedMatchEvent) iterator.next();
        if (createdMatchEvent == null)
            throw new RuntimeException("Restoring state failed");

        this.match = new Match(UUID.randomUUID(), createdMatchEvent.getPlayersMap());

        // Execute all arisen events.
        while (iterator.hasNext()) {
            Event next = iterator.next();
            next.execute(this.match);
View Full Code Here

TOP

Related Classes of match.aggregate.Match

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.