Class GameStateMessage


  • public class GameStateMessage
    extends AttributeMessage
    The message sent to check the game state.
    • Constructor Detail

      • GameStateMessage

        public GameStateMessage()
        Create a new GameStateMessage.
      • GameStateMessage

        public GameStateMessage​(FreeColServer.ServerState serverState)
        Create a new GameStateMessage with a given state.
        Parameters:
        serverState - The serverState to send.
      • GameStateMessage

        public GameStateMessage​(Game game,
                                FreeColXMLReader xr)
        Create a new GameStateMessage from a stream.
        Parameters:
        game - The Game to read within (unused, no game exists at this point).
        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.