Package domain

Class MonitorRepository


  • public class MonitorRepository
    extends java.lang.Object
    Author:
    Vincent Lammens (vincent@vincentlammens.be)
    • Constructor Summary

      Constructors 
      Constructor Description
      MonitorRepository()
      Constructs a MonitorRepository
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getMonitorStatus​(java.lang.String name)
      returns the status of a monitor
      java.util.List<java.lang.String> listMonitorNames()
      Returns a list of the names of the monitors
      void updateMonitorStatusInDatabase​(java.lang.String name, boolean status)
      Update the status of a monitor in the database
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MonitorRepository

        public MonitorRepository()
                          throws java.net.UnknownHostException
        Constructs a MonitorRepository
        Throws:
        java.net.UnknownHostException
    • Method Detail

      • listMonitorNames

        public java.util.List<java.lang.String> listMonitorNames()
        Returns a list of the names of the monitors
        Returns:
        List with the names of the monitors
      • getMonitorStatus

        public boolean getMonitorStatus​(java.lang.String name)
                                 throws java.io.IOException
        returns the status of a monitor
        Parameters:
        name - Name of the monitor
        Returns:
        boolean of the status
        Throws:
        java.io.IOException
      • updateMonitorStatusInDatabase

        public void updateMonitorStatusInDatabase​(java.lang.String name,
                                                  boolean status)
        Update the status of a monitor in the database
        Parameters:
        name - name of the monitor to update the status of
        status - new status of the monitor