Package xal.extension.fxapplication
Class FxApplicationStatusService
java.lang.Object
xal.extension.fxapplication.FxApplicationStatusService
- All Implemented Interfaces:
ApplicationStatus
FxApplicationStatusService handles FX application status queries on behalf of
the running application instance. Provides status information to clients on
the local network.
- Author:
- tap, Juan F. Esteban Müller <JuanF.EstebanMuller@ess.eu>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Request that the virtual machine run the garbage collector.void
forceQuit
(int code) Force the application to quit immediately without running any finalizers.Get the application name.double
Get the free memory available to the application instance.Get a heartbeat from the service.Get the name of the host where the application is running.Get the launch time of the application in seconds since the epoch (midnight GMT, January 1, 1970)double
Get the total memory consumed by the application instance.void
quit
(int code) Quit the application normally.void
reveal the application by bringing all windows to the front
-
Constructor Details
-
FxApplicationStatusService
-
-
Method Details
-
getFreeMemory
public double getFreeMemory()Get the free memory available to the application instance.- Specified by:
getFreeMemory
in interfaceApplicationStatus
- Returns:
- The free memory available on this virtual machine in kB.
-
getTotalMemory
public double getTotalMemory()Get the total memory consumed by the application instance.- Specified by:
getTotalMemory
in interfaceApplicationStatus
- Returns:
- The total memory consumed by the application instance in kB.
-
showAllWindows
public void showAllWindows()reveal the application by bringing all windows to the front- Specified by:
showAllWindows
in interfaceApplicationStatus
-
collectGarbage
public void collectGarbage()Request that the virtual machine run the garbage collector.- Specified by:
collectGarbage
in interfaceApplicationStatus
-
quit
public void quit(int code) Quit the application normally.- Specified by:
quit
in interfaceApplicationStatus
- Parameters:
code
- An unused status code.
-
forceQuit
public void forceQuit(int code) Force the application to quit immediately without running any finalizers.- Specified by:
forceQuit
in interfaceApplicationStatus
- Parameters:
code
- The status code used for halting the virtual machine.
-
getHostName
Get the name of the host where the application is running.- Specified by:
getHostName
in interfaceApplicationStatus
- Returns:
- The name of the host where the application is running.
-
getApplicationName
Get the application name.- Specified by:
getApplicationName
in interfaceApplicationStatus
- Returns:
- The application name.
-
getLaunchTime
Get the launch time of the application in seconds since the epoch (midnight GMT, January 1, 1970)- Specified by:
getLaunchTime
in interfaceApplicationStatus
- Returns:
- the time at with the application was launched in seconds since the epoch
-
getHeartbeat
Get a heartbeat from the service.- Specified by:
getHeartbeat
in interfaceApplicationStatus
- Returns:
- the time measured from the service at which the heartbeat was sent
-