java.lang.Object
is.codion.tools.monitor.model.ServerMonitor
A ServerMonitor
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
static final class
-
Constructor Summary
ConstructorDescriptionServerMonitor
(String hostName, ServerInformation serverInformation, int registryPort, User serverAdminUser, int updateRate) Instantiates a newServerMonitor
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addServerShutDownListener
(Runnable listener) void
Clears the server report cachevoid
Clears all collected statisticsorg.jfree.data.xy.XYDataset
org.jfree.data.xy.XYDataset
org.jfree.data.xy.XYDataset
logLevel()
org.jfree.data.xy.XYDataset
void
Refreshes the domain model listvoid
Refreshes the report model listvoid
Refreshes the report model listserver()
boolean
void
shutdown()
Shuts down this server monitorvoid
Shuts down the serverorg.jfree.data.xy.XYDataset
org.jfree.data.xy.XYDataset
-
Constructor Details
-
ServerMonitor
public ServerMonitor(String hostName, ServerInformation serverInformation, int registryPort, User serverAdminUser, int updateRate) throws RemoteException, ServerAuthenticationException Instantiates a newServerMonitor
- Parameters:
hostName
- the host nameserverInformation
- the server informationregistryPort
- the registry portserverAdminUser
- the admin userupdateRate
- the initial statistics update rate in seconds- Throws:
RemoteException
- in case of an exceptionServerAuthenticationException
- in case the admin user credentials are incorrect
-
-
Method Details
-
shutdown
public void shutdown()Shuts down this server monitor -
server
- Returns:
- the server being monitored
-
serverInformation
- Returns:
- the server information
-
memoryUsage
- Returns:
- the amount of memory being used by the server
-
connectionCount
- Returns:
- the number of connected clients
-
clientMonitor
- Returns:
- the client monitor
-
databaseMonitor
- Returns:
- the database monitor
-
logLevels
- Returns:
- the available log levels
-
connectionRequestsDataset
public org.jfree.data.xy.XYDataset connectionRequestsDataset()- Returns:
- the connection request dataset
-
memoryUsageDataset
public org.jfree.data.xy.XYDataset memoryUsageDataset()- Returns:
- the memory usage dataset
-
systemLoadDataset
public org.jfree.data.xy.XYDataset systemLoadDataset()- Returns:
- the system load dataset
-
connectionCountDataset
public org.jfree.data.xy.XYDataset connectionCountDataset()- Returns:
- the connection count dataset
-
gcEventsDataset
public org.jfree.data.xy.XYDataset gcEventsDataset()- Returns:
- the garbage collection event dataset
-
threadCountDataset
public org.jfree.data.xy.XYDataset threadCountDataset()- Returns:
- the thread count dataset
-
environmentInfo
- Returns:
- the server environment info
- Throws:
RemoteException
- in case of a communication error
-
clearStatistics
public void clearStatistics()Clears all collected statistics -
clearReportCache
Clears the server report cache- Throws:
RemoteException
- in case of an exception
-
refreshDomainList
public void refreshDomainList()Refreshes the domain model list -
refreshReportList
public void refreshReportList()Refreshes the report model list -
refreshOperationList
public void refreshOperationList()Refreshes the report model list -
domainTableModel
public FilterTableModel<EntityServerAdmin.DomainEntityDefinition,ServerMonitor.DomainColumns.Id> domainTableModel()- Returns:
- the table model for viewing the domain models
-
reportTableModel
public FilterTableModel<EntityServerAdmin.DomainReport,ServerMonitor.ReportColumns.Id> reportTableModel()- Returns:
- the table model for viewing reports
-
operationTableModel
public FilterTableModel<EntityServerAdmin.DomainOperation,ServerMonitor.OperationColumns.Id> operationTableModel()- Returns:
- the table model for viewing operations
-
shutdownServer
public void shutdownServer()Shuts down the server -
serverReachable
public boolean serverReachable()- Returns:
- true if the server is reachable
-
updateInterval
- Returns:
- the
Value
controlling the update interval
-
addServerShutDownListener
- Parameters:
listener
- a listener notified when the server is shut down
-
connectionLimit
- Returns:
- a listener notified when the connection number limit is changed
-
logLevel
- Returns:
- a
Value
controlling the log level
-