Package jmri.implementation
Class AbstractReporter
java.lang.Object
jmri.implementation.AbstractNamedBean
jmri.implementation.AbstractReporter
- All Implemented Interfaces:
Comparable<NamedBean>
,PropertyChangeProvider
,NamedBean
,Reporter
- Direct Known Subclasses:
AbstractIdTagReporter
,EcosReporter
,JMRIClientReporter
,RpsReporter
,TrackReporter
public abstract class AbstractReporter extends AbstractNamedBean implements Reporter
Abstract base for the Reporter interface.
Implements the parameter binding support.
Note that we consider it an error for there to be more than one object that corresponds to a particular physical Reporter on the layout. Abstract class providing the basic logic of the Reporter interface
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
Field Summary
Fields Modifier and Type Field Description protected Object
_currentReport
protected Object
_lastReport
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
Constructor Summary
Constructors Constructor Description AbstractReporter(String systemName)
AbstractReporter(String systemName, String userName)
-
Method Summary
Modifier and Type Method Description String
getBeanType()
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.Object
getCurrentReport()
Query the current report.Object
getLastReport()
Query the last report.void
setReport(Object r)
Provide a general method for updating the report.Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, dispose, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getFullyFormattedDisplayName, getFullyFormattedDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChange
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getComment, getDisplayName, getDisplayName, getFullyFormattedDisplayName, getFullyFormattedDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChange
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
Constructor Details
-
Method Details
-
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 interfaceNamedBean
- Returns:
- a string of the bean type, eg Turnout, Sensor etc
-
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 interfaceReporter
- Returns:
- the current report or null
-
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 interfaceReporter
- Returns:
- the last report or null
-
setReport
Provide a general method for updating the report.
-