Class VacantPlayersMessage


  • public class VacantPlayersMessage
    extends AttributeMessage
    The message sent to discover vacant players in a game.
    • Constructor Detail

      • VacantPlayersMessage

        public VacantPlayersMessage()
        Create a new VacantPlayersMessage.
      • VacantPlayersMessage

        public VacantPlayersMessage​(Game game,
                                    FreeColXMLReader xr)
        Create a new VacantPlayersMessage from a stream.
        Parameters:
        game - The Game this message belongs to (null here).
        xr - The FreeColXMLReader to read from.
    • Method Detail

      • clientHandler

        public void clientHandler​(FreeColClient freeColClient)
        Client-side handler for this message. Client handlers always return null.
        Overrides:
        clientHandler in class TrivialMessage
        Parameters:
        freeColClient - The FreeColClient to handle this message.
      • serverHandler

        public ChangeSet serverHandler​(FreeColServer freeColServer,
                                       ServerPlayer serverPlayer)
        Server-side handler for this message.
        Overrides:
        serverHandler in class TrivialMessage
        Parameters:
        freeColServer - The FreeColServer handling the request.
        serverPlayer - The ServerPlayer that sent the request.
        Returns:
        A ChangeSet defining the response.
      • getVacantPlayers

        public java.util.List<java.lang.String> getVacantPlayers()
        Get the vacant players.
        Returns:
        A list of vacant code player identifiers.
      • setVacantPlayers

        public VacantPlayersMessage setVacantPlayers​(Game game)
        Set the vacant players in this message from a given game.
        Parameters:
        game - The Game to find players in.
        Returns:
        This message.