Class SetGoodsLevelsMessage


  • public class SetGoodsLevelsMessage
    extends ObjectMessage
    The message sent when setting goods levels.
    • Constructor Detail

      • SetGoodsLevelsMessage

        public SetGoodsLevelsMessage​(Colony colony,
                                     ExportData data)
        Create a new SetGoodsLevelsMessage with the supplied colony and data.
        Parameters:
        colony - The Colony where the goods leves are set.
        data - The new ExportData.
      • SetGoodsLevelsMessage

        public SetGoodsLevelsMessage​(Game game,
                                     FreeColXMLReader xr)
                              throws javax.xml.stream.XMLStreamException
        Create a new SetGoodsLevelsMessage 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

      • getExportData

        private ExportData getExportData()
        Get the export data.
        Returns:
        The ExportData.
      • currentPlayerMessage

        public boolean currentPlayerMessage()
        Should this message only be sent to a server by the current player?
        Overrides:
        currentPlayerMessage in class TrivialMessage
        Returns:
        True if this is a current-player-only 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.