Class UpdateGameOptionsMessage


  • public class UpdateGameOptionsMessage
    extends ObjectMessage
    The message sent to update the game options.
    • Constructor Detail

      • UpdateGameOptionsMessage

        public UpdateGameOptionsMessage​(OptionGroup optionGroup)
        Create a new UpdateGameOptionsMessage with the supplied name.
        Parameters:
        optionGroup - The game options OptionGroup.
      • UpdateGameOptionsMessage

        public UpdateGameOptionsMessage​(Game game,
                                        FreeColXMLReader xr)
                                 throws javax.xml.stream.XMLStreamException
        Create a new UpdateGameOptionsMessage from a stream.
        Parameters:
        game - The Game this message belongs to.
        xr - The FreeColXMLReader to read from.
        Throws:
        javax.xml.stream.XMLStreamException - if there is a problem reading the stream.
    • Method Detail

      • getGameOptions

        private OptionGroup getGameOptions()
        Get the associated option group.
        Returns:
        The options.
      • 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.