////////////////////////////////////////
// Programming project code
// UniBw M, 2022, 2023, 2024
// www.unibw.de/inf2
// (c) Mark Minas (mark.minas@unibw.de)
////////////////////////////////////////

package pp.battleship.message.server;

import com.jme3.network.AbstractMessage;

/**
 * An abstract base class for server messages used in network transfer.
 * It extends the AbstractMessage class provided by the jme3-network library.
 */
public abstract class ServerMessage extends AbstractMessage {

    /**
     * Constructs a new ServerMessage instance.
     */
    protected ServerMessage() {
        super(true);
    }

    /**
     * Accepts a visitor for processing this message.
     *
     * @param interpreter the visitor to be used for processing
     */
    public abstract void accept(ServerInterpreter interpreter);

    /**
     * Gets the bundle key of the informational text to be shown at the client.
     * This key is used to retrieve the appropriate localized text for display.
     *
     * @return the bundle key of the informational text
     */
    public abstract String getInfoTextKey();
}
