Class AbstractReporter

    • Constructor Detail

      • AbstractReporter

        public AbstractReporter​(java.lang.String systemName,
                                java.lang.String userName)
    • Method Detail

      • getBeanType

        public java.lang.String getBeanType()
        Description copied from interface: NamedBean
        For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.
        Specified by:
        getBeanType in interface NamedBean
        Returns:
        a string of the bean type, eg Turnout, Sensor etc
      • getCurrentReport

        public java.lang.Object getCurrentReport()
        Description copied from interface: Reporter
        Query the current report. If there is no current report available (e.g. the reporting hardware says no information is currently available) this will return a null object.
        Specified by:
        getCurrentReport in interface Reporter
        Returns:
        the current report or null
      • getLastReport

        public java.lang.Object getLastReport()
        Description copied from interface: Reporter
        Query the last report. This will return a value even if there's no current report available. If there is a current report, both this and the current report will be equal. If nothing has ever been reported, this will return a null object.
        Specified by:
        getLastReport in interface Reporter
        Returns:
        the last report or null
      • setReport

        public void setReport​(java.lang.Object r)
        Provide a general method for updating the report.
        Specified by:
        setReport in interface Reporter
        Parameters:
        r - the report