Package jmri.jmrix
Class CaptiveSystemConnectionMemo
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrix.DefaultSystemConnectionMemo
-
- jmri.jmrix.CaptiveSystemConnectionMemo
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,Disposable
,SystemConnectionMemo
public class CaptiveSystemConnectionMemo extends DefaultSystemConnectionMemo
For historical reasons, some NamedBean types have out-of-pattern system prefixes:- OBlocks use O (as in OB)
- RailCom tags use R
- Transponding tags use L
SystemConnectionMemo
implementation is meant to handle these by providing connection memo services without being connected to a particular system instantiation.An object of this class does not get registered with the
InstanceManager
and is likely to have a system prefix and user name that conflict with the default values of another, user controllable, manager. This SystemConnectionMemo is not intended to be invoked on any system connection that is configurable by the user. Note that this is handled as a special case inDefaultSystemConnectionMemo
.Though not deprecated per se, this should not be used in new code. Instead. please use an
InternalSystemConnectionMemo
.
-
-
Field Summary
-
Fields inherited from class jmri.jmrix.DefaultSystemConnectionMemo
classObjectMap
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
Fields inherited from interface jmri.SystemConnectionMemo
DEREGISTER, DISABLED, INTERVAL, STORE, SYSTEM_PREFIX, USER_NAME
-
-
Constructor Summary
Constructors Constructor Description CaptiveSystemConnectionMemo(java.lang.String prefix, java.lang.String userName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.ResourceBundle
getActionModelResourceBundle()
<B extends NamedBean>
java.util.Comparator<B>getNamedBeanComparator(java.lang.Class<B> type)
Get the Comparator to be used for two NamedBeans.void
register()
Register with the SystemConnectionMemoManager and InstanceManager with proper ID for later retrieval as a generic system.-
Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, dispose, get, getActionFactory, getConsistManager, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, provides, setConsistManager, setDisabled, setOutputInterval, setSystemPrefix, setUserName, store
-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
CaptiveSystemConnectionMemo
public CaptiveSystemConnectionMemo(java.lang.String prefix, java.lang.String userName)
-
-
Method Detail
-
getActionModelResourceBundle
protected java.util.ResourceBundle getActionModelResourceBundle()
- Specified by:
getActionModelResourceBundle
in classDefaultSystemConnectionMemo
-
getNamedBeanComparator
public <B extends NamedBean> java.util.Comparator<B> getNamedBeanComparator(java.lang.Class<B> type)
Description copied from class:DefaultSystemConnectionMemo
Get the Comparator to be used for two NamedBeans. This is typically anNamedBeanComparator
, but may be any Comparator that works for this connection type.- Specified by:
getNamedBeanComparator
in interfaceSystemConnectionMemo
- Specified by:
getNamedBeanComparator
in classDefaultSystemConnectionMemo
- Type Parameters:
B
- the type of NamedBean- Parameters:
type
- the class of NamedBean- Returns:
- the Comparator
-
register
public void register()
Description copied from class:DefaultSystemConnectionMemo
Register with the SystemConnectionMemoManager and InstanceManager with proper ID for later retrieval as a generic system.This operation should occur only when the SystemConnectionMemo is ready for use.
- Specified by:
register
in interfaceSystemConnectionMemo
- Overrides:
register
in classDefaultSystemConnectionMemo
-
-