Class FountainOfYouthMessage


  • public class FountainOfYouthMessage
    extends AttributeMessage
    The message that contains a fountainOfYouth string.
    • Constructor Detail

      • FountainOfYouthMessage

        public FountainOfYouthMessage​(int migrants)
        Create a new FountainOfYouthMessage.
        Parameters:
        migrants - The number of new migrants on the docks.
      • FountainOfYouthMessage

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

      • aiHandler

        public void aiHandler​(FreeColServer freeColServer,
                              AIPlayer aiPlayer)
        AI-side handler for this message. AI handlers always return null. FIXME: One day the FreeColServer should devolve to AIMain.
        Overrides:
        aiHandler in class TrivialMessage
        Parameters:
        freeColServer - The FreeColServer handling the request.
        aiPlayer - The AIPlayer the message was sent to.
      • 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.
      • getMigrants

        public int getMigrants()
        Get the number of migrants.
        Returns:
        The number of migrants.