Klasse MachineHandler

java.lang.Object
de.bytestore.hostinger.handler.MachineHandler

public class MachineHandler extends Object
  • Felddetails

    • log

      protected static final org.slf4j.Logger log
  • Konstruktordetails

    • MachineHandler

      public MachineHandler()
  • Methodendetails

    • stats

      public static ProcessStats stats(Machines machinesIO)
      Executes the stats action for the given Machines object and returns the ProcessStats result.
      Parameter:
      machinesIO - the Machines object for which the stats action needs to be executed
      Gibt zurück:
      the ProcessStats object containing the statistics data (cpu, memory, swap, disk, download, upload)
      Löst aus:
      RuntimeException - if there is an error getting the machine stats
    • vnc

      public static VNCSocket vnc(Machines machineIO)
      Retrieves the VNC socket for the given Machines object.
      Parameter:
      machineIO - the Machines object for which the VNC socket needs to be retrieved
      Gibt zurück:
      the VNCSocket object representing the VNC socket configuration
    • config

      public static MachineExtensionConfig config(Machines machinesIO)
    • status

      public static ProcessStatus status(Machines machinesIO)
      Retrieves the status of the given Machines object.
      Parameter:
      machinesIO - the Machines object for which the status needs to be retrieved
      Gibt zurück:
      The ProcessStatus representing the current status of the Machines object. Returns ProcessStatus.NOT_FOUND if there is an error retrieving the status or if the status is not found.
      Löst aus:
      Exception - if there is an error retrieving the status
    • restart

      public static void restart(Machines machinesIO)
      Restarts the given Machines object.
      Parameter:
      machines - the Machines object that needs to be restarted
    • stop

      public static void stop(Machines machinesIO)
      Stops the machine.
    • wol

      public static void wol(Machines machinesIO)
      Wakes up the specified machine by calling the "wol" method on all registered MachineExtensionPoint instances that match the provider of the given Machines object.
      Parameter:
      machinesIO - the Machines object representing the machine to wake up
      Löst aus:
      Exception - if there is an error during the wake-on-LAN process
    • logs

      public static String logs(Machines machinesIO)
      Returns the log entry for the given Machines object by executing the log method of the registered extensions of the MachineExtensionPoint interface that match the provider of the Machines object.
      Parameter:
      machinesIO - the Machines object for which the log entry needs to be retrieved
      Gibt zurück:
      the log entry as a String
      Löst aus:
      Exception - if there is an error during the log retrieval process