Package jmri.jmrix
Interface NetworkPortAdapter
- All Superinterfaces:
PortAdapter
- All Known Implementing Classes:
AbstractNetworkPortController,BiDiBNetworkPortController,BiDiBOverTcpAdapter,DCCppEthernetAdapter,DCCppNetworkPortController,DCCppTcpDriverAdapter,EasyDccNetworkPortController,EcosPortController,JMRIClientPortController,LIUSBEthernetAdapter,LIUSBServerAdapter,LnNetworkPortController,LnTcpDriverAdapter,MarklinPortController,MarklinSimDriverAdapter,MergNetworkDriverAdapter,MqttAdapter,NceNetworkPortController,NetBiDiBAdapter,NetworkDriverAdapter,NetworkDriverAdapter,NetworkDriverAdapter,NetworkDriverAdapter,NetworkDriverAdapter,NetworkDriverAdapter,NetworkDriverAdapter,NetworkDriverAdapter,NetworkDriverAdapter,RfidNetworkPortController,SerialNetworkPortAdapter,SRCPPortController,TcpDriverAdapter,XNetNetworkPortController,XnTcpAdapter,Z21Adapter,Z21SimulatorAdapter
Enables basic setup of a network interface for a jmrix implementation. Based
upon work by Bob Jacobsen from SerialPortAdapter
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidConfigure all of the other jmrix widgets needed to work with this adaptervoidConnects to the end device using a hostname/ip address and portbooleanintgetPort()voidsetAdvertisementName(String AdName) voidsetHostName(String hostname) voidsetMdnsConfigure(boolean autoconfig) voidsetPort(int s) voidRemember the associated port name.voidsetServiceType(String ServiceType) booleanstatus()Query the status of this connection.Methods inherited from interface jmri.jmrix.PortAdapter
configureOption1, configureOption2, configureOption3, configureOption4, connect, dispose, getDisabled, getInputStream, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getOutputStream, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemConnectionMemo, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, recover, setDisabled, setManufacturer, setOptionState, setReconnectMaxAttempts, setReconnectMaxInterval, setSystemConnectionMemo, setSystemPrefix, setUserName
-
Method Details
-
connect
Connects to the end device using a hostname/ip address and port- Parameters:
host- hostname / ip address.port- network port.- Throws:
IOException- on connection error.
-
configure
void configure()Configure all of the other jmrix widgets needed to work with this adapter- Specified by:
configurein interfacePortAdapter
-
status
boolean status()Query the status of this connection.- Specified by:
statusin interfacePortAdapter- Returns:
- true if all is OK, at least as far as known.
-
setPort
Remember the associated port name.- Parameters:
s- port name.
-
setPort
-
getPort
int getPort() -
getCurrentPortName
- Specified by:
getCurrentPortNamein interfacePortAdapter
-
setHostName
-
getHostName
-
setMdnsConfigure
-
getMdnsConfigure
boolean getMdnsConfigure() -
autoConfigure
void autoConfigure() -
setAdvertisementName
-
getAdvertisementName
-
setServiceType
-
getServiceType
-