Package de.bytestore.hostinger.handler
Klasse MachineHandler
java.lang.Object
de.bytestore.hostinger.handler.MachineHandler
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic MachineExtensionConfigstatic StringReturns 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.static voidRestarts the given Machines object.static ProcessStatsExecutes the stats action for the given Machines object and returns the ProcessStats result.static ProcessStatusRetrieves the status of the given Machines object.static voidStops the machine.static VNCSocketRetrieves the VNC socket for the given Machines object.static voidWakes up the specified machine by calling the "wol" method on all registeredMachineExtensionPointinstances that match the provider of the givenMachinesobject.
-
Felddetails
-
log
protected static final org.slf4j.Logger log
-
-
Konstruktordetails
-
MachineHandler
public MachineHandler()
-
-
Methodendetails
-
stats
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
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
-
status
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
Restarts the given Machines object.- Parameter:
machines- the Machines object that needs to be restarted
-
stop
Stops the machine. -
wol
Wakes up the specified machine by calling the "wol" method on all registeredMachineExtensionPointinstances that match the provider of the givenMachinesobject. -
logs
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
-