java.lang.Object
is.codion.swing.framework.server.monitor.ServerMonitor

public final class ServerMonitor extends Object
A ServerMonitor
  • Constructor Details

    • ServerMonitor

      public ServerMonitor(String hostName, is.codion.common.rmi.server.ServerInformation serverInformation, int registryPort, is.codion.common.user.User serverAdminUser, int updateRate) throws RemoteException, is.codion.common.rmi.server.exception.ServerAuthenticationException
      Instantiates a new ServerMonitor
      Parameters:
      hostName - the host name
      serverInformation - the server information
      registryPort - the registry port
      serverAdminUser - the admin user
      updateRate - the initial statistics update rate in seconds
      Throws:
      RemoteException - in case of an exception
      is.codion.common.rmi.server.exception.ServerAuthenticationException - in case the admin user credentials are incorrect
  • Method Details

    • shutdown

      public void shutdown()
      Shuts down this server monitor
    • server

      public is.codion.framework.server.EntityServerAdmin server()
      Returns:
      the server being monitored
    • serverInformation

      public is.codion.common.rmi.server.ServerInformation serverInformation()
      Returns:
      the server information
    • memoryUsageObserver

      public is.codion.common.value.ValueObserver<String> memoryUsageObserver()
      Returns:
      the amount of memory being used by the server
    • connectionCountObserver

      public is.codion.common.value.ValueObserver<Integer> connectionCountObserver()
      Returns:
      the number of connected clients
    • clientMonitor

      public ClientUserMonitor clientMonitor()
      Returns:
      the client monitor
    • databaseMonitor

      public DatabaseMonitor databaseMonitor()
      Returns:
      the database monitor
    • logLevels

      public List<Object> 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

      public String environmentInfo() throws RemoteException
      Returns:
      the server environment info
      Throws:
      RemoteException - in case of a communication error
    • clearStatistics

      public void clearStatistics()
      Clears all collected statistics
    • clearReportCache

      public void clearReportCache() throws RemoteException
      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 is.codion.swing.common.model.component.table.FilteredTableModel<is.codion.framework.server.EntityServerAdmin.DomainEntityDefinition,Integer> domainTableModel()
      Returns:
      the table model for viewing the domain models
    • reportTableModel

      public is.codion.swing.common.model.component.table.FilteredTableModel<is.codion.framework.server.EntityServerAdmin.DomainReport,Integer> reportTableModel()
      Returns:
      the table model for viewing reports
    • operationTableModel

      public is.codion.swing.common.model.component.table.FilteredTableModel<is.codion.framework.server.EntityServerAdmin.DomainOperation,Integer> 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

      public is.codion.common.value.Value<Integer> updateInterval()
      Returns:
      the value controlling the update interval
    • addServerShutDownListener

      public void addServerShutDownListener(Runnable listener)
      Parameters:
      listener - a listener notified when the server is shut down
    • connectionLimit

      public is.codion.common.value.Value<Integer> connectionLimit()
      Returns:
      a listener notified when the connection number limit is changed
    • logLevel

      public is.codion.common.value.Value<Object> logLevel()
      Returns:
      a listener notified when the log level has changed