Package xal.app.launcher
Class RemoteAppRecord
- java.lang.Object
-
- xal.app.launcher.RemoteAppRecord
-
- All Implemented Interfaces:
EventListener,xal.tools.UpdateListener
public class RemoteAppRecord extends Object implements xal.tools.UpdateListener
RemoteAppRecord wraps the remote proxy so it can be hashed and included in collections
-
-
Constructor Summary
Constructors Constructor Description RemoteAppRecord(xal.extension.application.ApplicationStatus proxy)ConstructorRemoteAppRecord(xal.extension.application.ApplicationStatus proxy, xal.tools.UpdateListener updateListener)Primary Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforceQuit(int code)Force the application to quit immediately without running any finalizers.StringgetApplicationName()Get the application name.DategetHeartbeat()Get the heartbeat from the serviceStringgetHostName()Get the name of the host where the application is running.DategetLaunchTime()Get the launch time of the applicationdoublegetTotalMemory()Get the total memory consumed by the application instance.xal.tools.UpdateListenergetUpdateListener()get the update handlerbooleanisConnected()Determine whether this record is believed to be connected but don't testvoidobservedUpdate(Object source)called when the source posts an update to this observervoidquit(int code)Quit the application normally.voidrefresh()refresh the recordvoidsetUpdateListener(xal.tools.UpdateListener handler)set the update handler which is called when the cache has been updatedvoidshowAllWindows()reveal the application by bringing all windows to the front
-
-
-
Method Detail
-
setUpdateListener
public void setUpdateListener(xal.tools.UpdateListener handler)
set the update handler which is called when the cache has been updated
-
getUpdateListener
public xal.tools.UpdateListener getUpdateListener()
get the update handler
-
observedUpdate
public void observedUpdate(Object source)
called when the source posts an update to this observer- Specified by:
observedUpdatein interfacexal.tools.UpdateListener
-
refresh
public void refresh()
refresh the record
-
getTotalMemory
public double getTotalMemory()
Get the total memory consumed by the application instance.- Returns:
- The total memory consumed by the application instance.
-
getApplicationName
public String getApplicationName()
Get the application name.- Returns:
- The application name.
-
getHostName
public String getHostName()
Get the name of the host where the application is running.- Returns:
- The name of the host where the application is running.
-
getLaunchTime
public Date getLaunchTime()
Get the launch time of the application- Returns:
- the time at with the application was launched
-
getHeartbeat
public Date getHeartbeat()
Get the heartbeat from the service- Returns:
- the time at with the application was launched in seconds since the epoch
-
isConnected
public boolean isConnected()
Determine whether this record is believed to be connected but don't test
-
showAllWindows
public void showAllWindows()
reveal the application by bringing all windows to the front
-
quit
public void quit(int code)
Quit the application normally.- Parameters:
code- An unused status code.
-
forceQuit
public void forceQuit(int code)
Force the application to quit immediately without running any finalizers.- Parameters:
code- The status code used for halting the virtual machine.
-
-