Package jmri.jmrix.nce.networkdriver
Class NetworkDriverAdapter
java.lang.Object
jmri.jmrix.AbstractPortController
jmri.jmrix.AbstractNetworkPortController
jmri.jmrix.nce.NceNetworkPortController
jmri.jmrix.nce.networkdriver.NetworkDriverAdapter
- All Implemented Interfaces:
NetworkPortAdapter,PortAdapter
Implements SerialPortAdapter for the NCE system network connection.
This connects an NCE command station via a telnet connection. Normally controlled by the NetworkDriverFrame class.
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrix.AbstractPortController
AbstractPortController.Option -
Field Summary
Fields inherited from class jmri.jmrix.AbstractNetworkPortController
connTimeout, m_HostName, m_port, socketConnFields inherited from class jmri.jmrix.AbstractPortController
allowConnectionRecovery, manufacturerName, opened, option1Name, option2Name, option3Name, option4Name, options, reconnectinterval, reconnectMaxAttempts, reconnectMaxInterval -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidset up all of the other objects to operate with an NCE command station connected to this portprotected voidCalled once a reconnect attempt succeeds.Methods inherited from class jmri.jmrix.nce.NceNetworkPortController
getSystemConnectionMemoMethods inherited from class jmri.jmrix.AbstractNetworkPortController
autoConfigure, closeConnection, connect, connect, getAdvertisementName, getConnectionTimeout, getCurrentPortName, getHostAddress, getHostName, getInputStream, getMdnsConfigure, getOutputStream, getPort, getServiceType, reconnectFromLoop, setAdvertisementName, setConnectionTimeout, setHostAddress, setHostName, setMdnsConfigure, setPort, setPort, setServiceTypeMethods inherited from class jmri.jmrix.AbstractPortController
configureOption1, configureOption2, configureOption3, configureOption4, dispose, getAllowConnectionRecovery, getDisabled, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, purgeStream, reconnect, recover, safeSleep, setAllowConnectionRecovery, setClosed, setDisabled, setManufacturer, setOpened, setOptionState, setReconnectMaxAttempts, setReconnectMaxInterval, setSystemConnectionMemo, setSystemPrefix, setUserName, statusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.jmrix.NetworkPortAdapter
statusMethods inherited from interface jmri.jmrix.PortAdapter
configureOption1, configureOption2, configureOption3, configureOption4, dispose, getAllowConnectionRecovery, getDisabled, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, recover, setAllowConnectionRecovery, setDisabled, setManufacturer, setOptionState, setReconnectMaxAttempts, setReconnectMaxInterval, setSystemConnectionMemo, setSystemPrefix, setUserName
-
Constructor Details
-
NetworkDriverAdapter
public NetworkDriverAdapter()
-
-
Method Details
-
configure
set up all of the other objects to operate with an NCE command station connected to this port -
resetupConnection
Called once a reconnect attempt succeeds. The traffic controller's transmit/receive threads were torn down when the connection was lost (AbstractMRTrafficController.recovery() calls disconnectPort() before attempting reconnection), so they need to be started again against the fresh socket streams -- connectPort() does both, the same call configure() made for the original connection.- Overrides:
resetupConnectionin classAbstractNetworkPortController
-