Package jmri.jmrix.internal
Class InternalSystemConnectionMemo
java.lang.Object
jmri.beans.UnboundBean
jmri.beans.Bean
jmri.jmrix.DefaultSystemConnectionMemo
jmri.jmrix.internal.InternalSystemConnectionMemo
- All Implemented Interfaces:
BeanInterface,PropertyChangeFirer,PropertyChangeProvider,Disposable,InstanceManagerAutoDefault,SystemConnectionMemo
public class InternalSystemConnectionMemo
extends DefaultSystemConnectionMemo
implements InstanceManagerAutoDefault
Lightweight class to denote that a system is active, and provide general
information.
Things this needed to do:
- One of these must be automatically, transparently available - this is done by inheriting from jmri.InstanceManagerAutoDefault
- It must be possible to have more than one of these, so you can have multiple internal systems defined - each one keeps internal references to its objects
- It must make sure that its objects are available individually through the instance manager.
- But it also has to handle the ProxyManager special cases in the InstanceManager
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) booleanFields inherited from class jmri.jmrix.DefaultSystemConnectionMemo
classObjectMapFields inherited from class jmri.beans.Bean
propertyChangeSupportFields inherited from interface jmri.SystemConnectionMemo
DEREGISTER, DISABLED, INTERVAL, STORE, SYSTEM_PREFIX, USER_NAME -
Constructor Summary
ConstructorsConstructorDescriptionInternalSystemConnectionMemo(boolean defaultInstanceType) InternalSystemConnectionMemo(String prefix, String name) InternalSystemConnectionMemo(String prefix, String name, boolean defaultInstanceType) -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure the common managers for Internal connections.voiddispose()Dispose of System Connection.<T> TGet a manager for a specific type.protected ResourceBundleProvide access to the ConsistManager for this particular connection.<B extends NamedBean>
Comparator<B>getNamedBeanComparator(Class<B> type) Get the Comparator to be used for two NamedBeans.booleanCheck if this connection provides a specific manager type.Methods inherited from class jmri.jmrix.DefaultSystemConnectionMemo
deregister, getActionFactory, getDefaultOutputInterval, getDisabled, getOutputInterval, getSystemPrefix, getUserName, isDirty, isRestartRequired, register, setConsistManager, setDisabled, setOutputInterval, setSystemPrefix, setUserName, storeMethods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
configured
boolean configured -
defaultInstanceType
boolean defaultInstanceType
-
-
Constructor Details
-
InternalSystemConnectionMemo
-
InternalSystemConnectionMemo
-
InternalSystemConnectionMemo
-
InternalSystemConnectionMemo
public InternalSystemConnectionMemo()
-
-
Method Details
-
configureManagers
Configure the common managers for Internal connections. This puts the common manager config in one place.Note: The Proxy system can cause some managers to be created early. We don't call configureManagers in that case, as it causes an infinite loop.
-
getSensorManager
-
getLightManager
-
getReporterManager
-
getTurnoutManager
-
getMeterManager
-
getStringIOManager
-
getPowerManager
-
getConsistManager
Description copied from class:DefaultSystemConnectionMemoProvide access to the ConsistManager for this particular connection.- Overrides:
getConsistManagerin classDefaultSystemConnectionMemo- Returns:
- the provided ConsistManager or null if the connection does not provide a ConsistManager
-
getThrottleManager
-
getProgrammerManager
-
provides
Description copied from class:DefaultSystemConnectionMemoCheck if this connection provides a specific manager type. This method must return false if a manager for the specific type is not provided, and must return true if a manager for the specific type is provided.- Specified by:
providesin interfaceSystemConnectionMemo- Overrides:
providesin classDefaultSystemConnectionMemo- Parameters:
type- The class type for the manager to be provided- Returns:
- true if the specified manager is provided
- See Also:
-
get
Description copied from class:DefaultSystemConnectionMemoGet a manager for a specific type. This method must return a non-null value ifDefaultSystemConnectionMemo.provides(java.lang.Class)is true for the type, and must return null if provides() is false for the type.- Specified by:
getin interfaceSystemConnectionMemo- Overrides:
getin classDefaultSystemConnectionMemo- Type Parameters:
T- Type of manager to get- Parameters:
type- Type of manager to get- Returns:
- The manager or null if provides() is false for T
- See Also:
-
getActionModelResourceBundle
- Specified by:
getActionModelResourceBundlein classDefaultSystemConnectionMemo
-
getNamedBeanComparator
Description copied from class:DefaultSystemConnectionMemoGet 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:
getNamedBeanComparatorin interfaceSystemConnectionMemo- Specified by:
getNamedBeanComparatorin classDefaultSystemConnectionMemo- Type Parameters:
B- the type of NamedBean- Parameters:
type- the class of NamedBean- Returns:
- the Comparator
-
dispose
Description copied from class:DefaultSystemConnectionMemoDispose of System Connection.Removes objects from classObjectMap after calling dispose if Disposable. Removes these objects from InstanceManager.
- Specified by:
disposein interfaceDisposable- Specified by:
disposein interfaceSystemConnectionMemo- Overrides:
disposein classDefaultSystemConnectionMemo
-