Class Z21Reporter
- All Implemented Interfaces:
Comparable<NamedBean>,EventListener,PropertyChangeProvider,CollectingReporter,IdTagListener,AbstractMRListener,Z21Listener,NamedBean,PhysicalLocationReporter,Reporter
Reports from this reporter are of the type jmri.RailCom.
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameExceptionNested classes/interfaces inherited from interface jmri.PhysicalLocationReporter
PhysicalLocationReporter.Direction -
Field Summary
Fields inherited from class jmri.implementation.AbstractReporter
_currentReport, _lastReportFields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, registerFields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWNFields inherited from interface jmri.Reporter
PROPERTY_COLLECTION, PROPERTY_CURRENT_REPORT, PROPERTY_LAST_REPORT, PROPERTY_REPORT_METADATA -
Constructor Summary
ConstructorsConstructorDescriptionZ21Reporter(String systemName, String userName, Z21SystemConnectionMemo memo) Create a new Z21Reporter. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Deactivate this object, so that it releases as many resources as possible and no longer effects others.booleanIndicates whether the underlying hardware sends messages determining when an Id is no longer in this reporter (e.g.voidmessage(Z21Message msg) Member function that will be invoked by a z21Interface implementation to forward a z21 message sent to the layout.voidMember function that will be invoked by a z21Interface implementation to forward a z21 message from the layout.Methods inherited from class jmri.implementation.AbstractRailComReporter
getLocoAddressMethods inherited from class jmri.implementation.AbstractIdTagReporter
describeState, getDirection, getPhysicalLocation, getPhysicalLocation, getState, notify, notifySeenElsewhere, setReport, setStateMethods inherited from class jmri.implementation.AbstractReporter
getBeanType, getCurrentReport, getLastReport, notifyCollectionUpdatedMethods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, equals, firePropertyChange, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChangeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getRecommendedToolTip, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChangeMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface jmri.Reporter
getCurrentReport, getLastReport, getState, notifySeenElsewhere, setReport
-
Constructor Details
-
Z21Reporter
Create a new Z21Reporter.- Parameters:
systemName- the system name of the new reporter.userName- the user name of the new reporter.memo- an instance of Z21SystemConnectionMemo this manager is associated with.
-
-
Method Details
-
hasExitReports
Indicates whether the underlying hardware sends messages determining when an Id is no longer in this reporter (e.g. RailCom block occupancy exit events).When
false(e.g. RFID point detectors), seeing a tag elsewhere implies it has departed this reporter. Whentrue, departure is strictly governed by hardware exit/clear messages.- Specified by:
hasExitReportsin classAbstractRailComReporter- Returns:
- true if hardware sends explicit exit/departure messages; false otherwise.
-
reply
Member function that will be invoked by a z21Interface implementation to forward a z21 message from the layout.- Specified by:
replyin interfaceZ21Listener- Parameters:
msg- The received z21 reply. Note that this same object may be presented to multiple users. It should not be modified here.
-
message
Member function that will be invoked by a z21Interface implementation to forward a z21 message sent to the layout. Normally, this function will do nothing.- Specified by:
messagein interfaceZ21Listener- Parameters:
msg- The received z21 message. Note that this same object may be presented to multiple users. It should not be modified here.
-
getCollection
- Specified by:
getCollectionin interfaceCollectingReporter- Returns:
- the collection of elements associated with this reporter.
-
dispose
Description copied from class:AbstractNamedBeanDeactivate this object, so that it releases as many resources as possible and no longer effects others.For example, if this object has listeners, after a call to this method it should no longer notify those listeners. Any native or system-wide resources it maintains should be released, including threads, files, etc.
It is an error to invoke any other methods on this object once dispose() has been called. Note, however, that there is no guarantee about behavior in that case.
Afterwards, references to this object may still exist elsewhere, preventing its garbage collection. But it's formally dead, and shouldn't be keeping any other objects alive. Therefore, this method should null out any references to other objects that this NamedBean contained.
- Specified by:
disposein interfaceNamedBean- Overrides:
disposein classAbstractNamedBean
-