Package jmri.managers
Class DefaultRailComManager
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.beans.VetoableChangeSupport
-
- jmri.managers.AbstractManager<IdTag>
-
- jmri.managers.DefaultIdTagManager
-
- jmri.managers.DefaultRailComManager
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.beans.VetoableChangeListener
,java.util.EventListener
,PropertyChangeFirer
,PropertyChangeProvider
,SilenceablePropertyChangeProvider
,VetoableChangeFirer
,VetoableChangeProvider
,Disposable
,IdTagManager
,Manager<IdTag>
,ProvidingManager<IdTag>
,RailComManager
public class DefaultRailComManager extends DefaultIdTagManager implements RailComManager
Concrete implementation for the InternalRailComManager
interface.- Since:
- 2.99.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.managers.DefaultIdTagManager
DefaultIdTagManager.Initializer
-
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.DefaultIdTagManager
dirty, PROPERTY_INITIALISED
-
Fields inherited from class jmri.managers.AbstractManager
_beans, _tsys, _tuser, lastAutoNamedBeanRef, memo, paddedNumber, 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 DefaultRailComManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RailCom
createNewIdTag(java.lang.String systemName, java.lang.String userName)
IdTag
newIdTag(java.lang.String systemName, java.lang.String userName)
Provide by userName, then SystemName, else create new.void
readIdTagDetails()
(package private) void
setInstances()
void
writeIdTagDetails()
-
Methods inherited from class jmri.managers.DefaultIdTagManager
deregister, dispose, getBeanTypeHandled, getBySystemName, getByTagID, getByUserName, getIdTag, getNamedBeanClass, getNamedBeanSet, getObjectCount, getTagsForReporter, getXMLOrder, init, initShutdownTask, isFastClockUsed, isInitialised, isStateStored, propertyChange, provide, provideIdTag, register, registerSelf, setFastClockUsed, setStateStored, typeLetter
-
Methods inherited from class jmri.managers.AbstractManager
addDataListener, checkNumeric, createSystemName, deleteBean, fireDataListenersAdded, fireDataListenersRemoved, fireVetoableChange, getAutoSystemName, getBySystemName, getKnownBeanProperties, getMemo, getNamedBean, getOuterBean, getSystemPrefix, handleUserNameUniqueness, makeSystemName, registerUserName, removeDataListener, setDataListenerMute, setPropertyChangesSilenced, setRegisterSelf, 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.IdTagManager
getBySystemName, getByTagID, getByUserName, getIdTag, getTagsForReporter, init, isFastClockUsed, isInitialised, isStateStored, provideIdTag, setFastClockUsed, setStateStored
-
Methods inherited from interface jmri.Manager
addDataListener, deleteBean, deregister, dispose, getBeanTypeHandled, getBeanTypeHandled, getEntryToolTip, getKnownBeanProperties, getMemo, getNamedBean, getNamedBeanClass, getNamedBeanSet, getObjectCount, getSubSystemNamePrefix, getSystemNamePrefix, getSystemPrefix, getXMLOrder, isValidSystemNameFormat, makeSystemName, makeSystemName, makeSystemName, register, removeDataListener, setDataListenerMute, typeLetter, validateBadCharsInSystemNameFormat, validateIntegerSystemNameFormat, validateNmraAccessorySystemNameFormat, validateSystemNameFormat, validateSystemNameFormat, validateSystemNameFormatOnlyNumeric, validateSystemNamePrefix, validateTrimmedMin1NumberSystemNameFormat, validateTrimmedSystemNameFormat, validateUppercaseTrimmedSystemNameFormat, validSystemNameFormat
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface jmri.ProvidingManager
provide
-
Methods inherited from interface jmri.beans.SilenceablePropertyChangeProvider
setPropertyChangesSilenced
-
Methods inherited from interface jmri.beans.VetoableChangeProvider
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
-
-
-
Constructor Detail
-
DefaultRailComManager
public DefaultRailComManager()
-
-
Method Detail
-
setInstances
final void setInstances()
-
createNewIdTag
protected RailCom createNewIdTag(@Nonnull java.lang.String systemName, java.lang.String userName)
- Overrides:
createNewIdTag
in classDefaultIdTagManager
-
newIdTag
@Nonnull public IdTag newIdTag(@Nonnull java.lang.String systemName, @CheckForNull java.lang.String userName) throws java.lang.IllegalArgumentException
Provide by userName, then SystemName, else create new. Provide ID Tag by UserName then SystemName, creates new IdTag if not found. Return an instance with the specified system and user names. Note that two calls with the same arguments will get the same instance; there is only one IdTag object representing a given physical IdTag and therefore only one with a specific system or user name.This will always return a valid object reference; a new object will be created if necessary. In that case:
- If a null reference is given for user name, no user name will be associated with the IdTag object created; a valid system name must be provided
- If both are provided, the system name defines the hardware access of the desired IdTag, and the user address is associated with it. The system name must be valid.
- Specified by:
newIdTag
in interfaceIdTagManager
- Overrides:
newIdTag
in classDefaultIdTagManager
- Parameters:
systemName
- the system nameuserName
- the user name- Returns:
- requested IdTag object (never null)
- Throws:
java.lang.IllegalArgumentException
- if cannot create the IdTag due to e.g. an illegal name or name that can't be parsed.
-
writeIdTagDetails
public void writeIdTagDetails() throws java.io.IOException
- Overrides:
writeIdTagDetails
in classDefaultIdTagManager
- Throws:
java.io.IOException
-
readIdTagDetails
public void readIdTagDetails()
- Overrides:
readIdTagDetails
in classDefaultIdTagManager
-
-