Package jmri.jmrix.roco.z21
Class Z21ReporterManager
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.beans.VetoableChangeSupport
-
- jmri.managers.AbstractManager<Reporter>
-
- jmri.managers.AbstractReporterManager
-
- jmri.jmrix.roco.z21.Z21ReporterManager
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.beans.VetoableChangeListener
,java.util.EventListener
,PropertyChangeFirer
,PropertyChangeProvider
,SilenceablePropertyChangeProvider
,VetoableChangeFirer
,VetoableChangeProvider
,AbstractMRListener
,Z21Listener
,Manager<Reporter>
,NameIncrementingManager
,ProvidingManager<Reporter>
,ReporterManager
public class Z21ReporterManager extends AbstractReporterManager implements Z21Listener
Z21ReporterManager implements the Reporter Manager interface for Roco Z21 systems. Todo : add validateSystemNameFormat method
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.Manager
Manager.ManagerDataEvent<E extends NamedBean>, Manager.ManagerDataListener<E extends NamedBean>, Manager.NameValidity
-
-
Field Summary
-
Fields inherited from class jmri.managers.AbstractManager
_beans, _tsys, _tuser, memo, silenceableProperties, silencedProperties
-
Fields inherited from class jmri.beans.VetoableChangeSupport
vetoableChangeSupport
-
Fields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport
-
Fields inherited from interface jmri.Manager
ANALOGIOS, AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, CTCDATA, ENTRYEXIT, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXNG_ANALOG_ACTIONS, LOGIXNG_ANALOG_EXPRESSIONS, LOGIXNG_CONDITIONALNGS, LOGIXNG_DIGITAL_ACTIONS, LOGIXNG_DIGITAL_BOOLEAN_ACTIONS, LOGIXNG_DIGITAL_EXPRESSIONS, LOGIXNG_GLOBAL_VARIABLES, LOGIXNG_MODULES, LOGIXNG_STRING_ACTIONS, LOGIXNG_STRING_EXPRESSIONS, LOGIXNG_TABLES, LOGIXNGS, LOGIXS, MEMORIES, METERFRAMES, METERS, OBLOCKS, PANELFILES, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, STRINGIOS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS
-
-
Constructor Summary
Constructors Constructor Description Z21ReporterManager(Z21SystemConnectionMemo memo)
Create a new Z21ReporterManager
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Reporter
createNewReporter(java.lang.String systemName, java.lang.String userName)
Internal method to invoke the factory, after all the logic for returning an existing Reporter has been invoked.void
enableInternalReporterCreationFromMessages()
Enable automatic creation of the Internal Z21 Reporter from messages.Reporter
getBySystemName(java.lang.String sName)
Locate an existing instance based on a system name.Z21SystemConnectionMemo
getMemo()
Get the system connection for this manager.void
message(Z21Message msg)
Member function that will be invoked by a z21Interface implementation to forward a z21 message sent to the layout.void
reply(Z21Reply msg)
Member function that will be invoked by a z21Interface implementation to forward a z21 message from the layout.-
Methods inherited from class jmri.managers.AbstractReporterManager
getBeanTypeHandled, getByDisplayName, getEntryToolTip, getNamedBeanClass, getReporter, getXMLOrder, newReporter, provideReporter, typeLetter
-
Methods inherited from class jmri.managers.AbstractManager
addDataListener, checkNumeric, createSystemName, deleteBean, deregister, dispose, fireDataListenersAdded, fireDataListenersRemoved, fireVetoableChange, getAutoSystemName, getBySystemName, getByUserName, getKnownBeanProperties, getNamedBean, getNamedBeanSet, getObjectCount, getOuterBean, getSystemPrefix, handleUserNameUniqueness, makeSystemName, propertyChange, register, registerSelf, registerUserName, removeDataListener, setDataListenerMute, setPropertyChangesSilenced, updateAutoNumber, validSystemNameFormat, vetoableChange
-
Methods inherited from class jmri.beans.VetoableChangeSupport
addVetoableChangeListener, addVetoableChangeListener, fireVetoableChange, fireVetoableChange, fireVetoableChange, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.Manager
addDataListener, deleteBean, deregister, dispose, getBeanTypeHandled, getKnownBeanProperties, getNamedBean, getNamedBeanSet, getObjectCount, getSubSystemNamePrefix, getSystemNamePrefix, getSystemPrefix, isValidSystemNameFormat, makeSystemName, makeSystemName, makeSystemName, register, removeDataListener, setDataListenerMute, validateBadCharsInSystemNameFormat, validateIntegerSystemNameFormat, validateNmraAccessorySystemNameFormat, validateSystemNameFormat, validateSystemNameFormat, validateSystemNameFormatOnlyNumeric, validateSystemNamePrefix, validateTrimmedMin1NumberSystemNameFormat, validateTrimmedSystemNameFormat, validateUppercaseTrimmedSystemNameFormat, validSystemNameFormat
-
Methods inherited from interface jmri.NameIncrementingManager
allowMultipleAdditions, getNextValidSystemName
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface jmri.ReporterManager
createSystemName, getByUserName, provide
-
Methods inherited from interface jmri.beans.SilenceablePropertyChangeProvider
setPropertyChangesSilenced
-
Methods inherited from interface jmri.beans.VetoableChangeProvider
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
-
-
-
Constructor Detail
-
Z21ReporterManager
public Z21ReporterManager(Z21SystemConnectionMemo memo)
Create a new Z21ReporterManager- Parameters:
memo
- an instance of Z21SystemConnectionMemo this manager is associated with.
-
-
Method Detail
-
getMemo
@Nonnull public Z21SystemConnectionMemo getMemo()
Get the system connection for this manager.
-
createNewReporter
@Nonnull protected Reporter createNewReporter(@Nonnull java.lang.String systemName, java.lang.String userName) throws java.lang.IllegalArgumentException
Description copied from class:AbstractReporterManager
Internal method to invoke the factory, after all the logic for returning an existing Reporter has been invoked.- Specified by:
createNewReporter
in classAbstractReporterManager
- Parameters:
systemName
- system name.userName
- username.- Returns:
- never null
- Throws:
java.lang.IllegalArgumentException
-
reply
public void reply(Z21Reply msg)
Member function that will be invoked by a z21Interface implementation to forward a z21 message from the layout.- Specified by:
reply
in 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
public void message(Z21Message msg)
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:
message
in interfaceZ21Listener
- Parameters:
msg
- The received z21 message. Note that this same object may be presented to multiple users. It should not be modified here.
-
enableInternalReporterCreationFromMessages
public void enableInternalReporterCreationFromMessages()
Enable automatic creation of the Internal Z21 Reporter from messages. Defaults to disabled.
-
getBySystemName
public Reporter getBySystemName(@Nonnull java.lang.String sName)
Locate an existing instance based on a system name.- Specified by:
getBySystemName
in interfaceManager<Reporter>
- Specified by:
getBySystemName
in interfaceReporterManager
- Overrides:
getBySystemName
in classAbstractManager<Reporter>
- Parameters:
sName
- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
-