Class NetworkDriverAdapter
java.lang.Object
jmri.jmrix.AbstractPortController
jmri.jmrix.AbstractNetworkPortController
jmri.jmrix.cmri.serial.SerialNetworkPortAdapter
jmri.jmrix.cmri.serial.networkdriver.NetworkDriverAdapter
- All Implemented Interfaces:
NetworkPortAdapter,PortAdapter
Implements SerialNetworkPortAdapter for a network connection.
This connects 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 connected to this port.protected voidCalled once a reconnect attempt succeeds (this.connect() returned without throwing).Methods inherited from class jmri.jmrix.cmri.serial.SerialNetworkPortAdapter
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 connected to this port. -
resetupConnection
Called once a reconnect attempt succeeds (this.connect() returned without throwing). The traffic controller's transmit/receive threads were already torn down when the connection was lost (see AbstractMRTrafficController.recovery()/disconnectPort()), so they need to be started again against the fresh socket streams -- connectPort() does both (re-reads getInputStream()/getOutputStream() from this adapter and spawns new transmit/receive threads), the same call configure() made for the original connection.- Overrides:
resetupConnectionin classAbstractNetworkPortController
-