Package jmri
Interface SystemConnectionMemo
-
- All Superinterfaces:
PropertyChangeProvider
- All Known Subinterfaces:
ConfiguringSystemConnectionMemo
- All Known Implementing Classes:
AcelaSystemConnectionMemo,AnymaDMX_SystemConnectionMemo,BiDiBSystemConnectionMemo,CanSystemConnectionMemo,CaptiveSystemConnectionMemo,CdBSystemConnectionMemo,CMRISystemConnectionMemo,Dcc4PcSystemConnectionMemo,DCCppSystemConnectionMemo,DefaultSystemConnectionMemo,DirectSystemConnectionMemo,EasyDccSystemConnectionMemo,EcosSystemConnectionMemo,EliteXNetSystemConnectionMemo,GrapevineSystemConnectionMemo,HexFileSystemConnectionMemo,IEEE802154SystemConnectionMemo,InternalSystemConnectionMemo,IpocsSystemConnectionMemo,JMRIClientSystemConnectionMemo,LocoNetSystemConnectionMemo,MapleSystemConnectionMemo,MarklinSystemConnectionMemo,MqttSystemConnectionMemo,MrcSystemConnectionMemo,Mx1SystemConnectionMemo,NceSystemConnectionMemo,OakTreeSystemConnectionMemo,PR2SystemConnectionMemo,PR3SystemConnectionMemo,PR4SystemConnectionMemo,QsiSystemConnectionMemo,RaspberryPiSystemConnectionMemo,RfidSystemConnectionMemo,RpsSystemConnectionMemo,SecsiSystemConnectionMemo,SerialSystemConnectionMemo,SerialSystemConnectionMemo,SpecificSystemConnectionMemo,SpecificSystemConnectionMemo,SpecificSystemConnectionMemo,SpecificSystemConnectionMemo,SpecificSystemConnectionMemo,SpeedoSystemConnectionMemo,SprogSystemConnectionMemo,SRCPBusConnectionMemo,SRCPSystemConnectionMemo,TamsSystemConnectionMemo,TmccSystemConnectionMemo,UhlenbrockSystemConnectionMemo,UsbDcs210PlusSystemConnectionMemo,UsbDcs240PlusSystemConnectionMemo,UsbDcs240SystemConnectionMemo,UsbDcs52SystemConnectionMemo,XBeeConnectionMemo,XNetSystemConnectionMemo,XpaSystemConnectionMemo,Z21SystemConnectionMemo
public interface SystemConnectionMemo extends PropertyChangeProvider
Lightweight interface denoting that a system is active, and provide general information.Objects of specific subtypes of this are registered in the
InstanceManagerto activate their particular system.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEREGISTERstatic java.lang.StringDISABLEDstatic java.lang.StringINTERVALstatic java.lang.StringSTOREstatic java.lang.StringSYSTEM_PREFIXstatic java.lang.StringUSER_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()<T> Tget(java.lang.Class<T> type)Get a manager for a specific type.StartupActionFactorygetActionFactory()Provide a factory for getting startup actions.intgetDefaultOutputInterval()Get the Default connection specific OutputInterval to wait between/before commands are sent.booleangetDisabled()Get if the System Connection is currently Disabled.<B extends NamedBean>
java.util.Comparator<B>getNamedBeanComparator(java.lang.Class<B> type)Get the Comparator to be used for two NamedBeans.intgetOutputInterval()Get the connection specific OutputInterval to wait between/before commands are sent, configured in AdapterConfig.java.lang.StringgetSystemPrefix()Provide access to the system prefix string.java.lang.StringgetUserName()Provide access to the system user name string.booleanisDirty()Get if connection is dirty.booleanisRestartRequired()booleanprovides(java.lang.Class<?> c)Check if this connection provides a specific manager type.voidregister()Store in InstanceManager with proper ID for later retrieval as a generic system.voidsetDisabled(boolean disabled)Set if the System Connection is currently Disabled.voidsetOutputInterval(int newInterval)booleansetSystemPrefix(java.lang.String systemPrefix)Set the system prefix.booleansetUserName(java.lang.String userName)Set the user name for the system connection.-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
DISABLED
static final java.lang.String DISABLED
- See Also:
- Constant Field Values
-
USER_NAME
static final java.lang.String USER_NAME
- See Also:
- Constant Field Values
-
SYSTEM_PREFIX
static final java.lang.String SYSTEM_PREFIX
- See Also:
- Constant Field Values
-
INTERVAL
static final java.lang.String INTERVAL
- See Also:
- Constant Field Values
-
STORE
static final java.lang.String STORE
- See Also:
- Constant Field Values
-
DEREGISTER
static final java.lang.String DEREGISTER
- See Also:
- Constant Field Values
-
-
Method Detail
-
dispose
void dispose()
-
get
@OverridingMethodsMustInvokeSuper <T> T get(java.lang.Class<T> type)
Get a manager for a specific type. This method must return a non-null value ifprovides(java.lang.Class)is true for the type, and must return null if provides() is false for the type.- 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:
provides(java.lang.Class)
-
getActionFactory
@Nonnull StartupActionFactory getActionFactory()
Provide a factory for getting startup actions.This is a bound, read-only, property under the name "actionFactory".
- Returns:
- the factory
-
getDisabled
boolean getDisabled()
Get if the System Connection is currently Disabled.- Returns:
- true if Disabled, else false.
-
getNamedBeanComparator
<B extends NamedBean> java.util.Comparator<B> getNamedBeanComparator(java.lang.Class<B> type)
Get the Comparator to be used for two NamedBeans. This is typically anNamedBeanComparator, but may be any Comparator that works for this connection type.- Type Parameters:
B- the type of NamedBean- Parameters:
type- the class of NamedBean- Returns:
- the Comparator
-
getSystemPrefix
java.lang.String getSystemPrefix()
Provide access to the system prefix string.This was previously called the "System letter".
- Returns:
- System prefix
-
getUserName
java.lang.String getUserName()
Provide access to the system user name string.This was previously fixed at configuration time.
- Returns:
- User name of the connection
-
isDirty
boolean isDirty()
Get if connection is dirty. Checked fields are disabled, prefix, userName- Returns:
- true if changed since loaded
-
isRestartRequired
boolean isRestartRequired()
-
provides
@OverridingMethodsMustInvokeSuper boolean provides(java.lang.Class<?> c)
Check 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.- Parameters:
c- The class type for the manager to be provided- Returns:
- true if the specified manager is provided
- See Also:
get(java.lang.Class)
-
register
void register()
Store in InstanceManager with proper ID for later retrieval as a generic system.
-
setDisabled
void setDisabled(boolean disabled)
Set if the System Connection is currently Disabled.disabledAsLoaded is only set once. Sends PropertyChange on change of disabled status.
- Parameters:
disabled- true to disable, false to enable.
-
setSystemPrefix
boolean setSystemPrefix(@Nonnull java.lang.String systemPrefix)
Set the system prefix.- Parameters:
systemPrefix- prefix to use for this system connection- Returns:
- true if the system prefix could be set
- Throws:
java.lang.NullPointerException- if systemPrefix is null
-
setUserName
boolean setUserName(@Nonnull java.lang.String userName)
Set the user name for the system connection.- Parameters:
userName- user name to use for this system connection- Returns:
- true if the user name could be set
- Throws:
java.lang.NullPointerException- if name is null
-
getOutputInterval
int getOutputInterval()
Get the connection specific OutputInterval to wait between/before commands are sent, configured in AdapterConfig. Used inAbstractTurnout.setCommandedStateAtInterval(int).- Returns:
- the output interval time in ms
-
getDefaultOutputInterval
int getDefaultOutputInterval()
Get the Default connection specific OutputInterval to wait between/before commands are sent.- Returns:
- the default output interval time in ms.
-
setOutputInterval
void setOutputInterval(int newInterval)
-
-