Class Configuration


  • public class Configuration
    extends Object
    This class represents a WakeOnLan configuration.
    Author:
    Steffen Moldaner
    • Constructor Detail

      • Configuration

        public Configuration()
      • Configuration

        public Configuration​(String path)
        Creates a new configuration with the given path.
        Parameters:
        path - a path that denotes a file the configuration will be saved to
      • Configuration

        public Configuration​(File file)
        Creates a new configuration with the given file. If the file exists the configurations loads immidiatly from this file.
        Parameters:
        file - a file this configuration will be saved to
        See Also:
        loadConfig()
    • Method Detail

      • getMachines

        public Machine[] getMachines()
        Returns the machines.
        Returns:
        the machines
      • setMachines

        public void setMachines​(Machine[] machines)
        Sets the machines.
        Parameters:
        machines - the machines
      • saveConfigAs

        public void saveConfigAs​(File file)
                          throws FileNotFoundException
        Saves this configuration to the given file. The configuration will then use this file for saves.
        Parameters:
        file - the file
        Throws:
        FileNotFoundException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
        See Also:
        saveConfigAs(File)
      • getFile

        public File getFile()
        Returns the file for this configuration.
        Returns:
        the file