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
,MergNetworkDriverAdapter
,MqttAdapter
,NceNetworkPortController
,NetworkDriverAdapter
,NetworkDriverAdapter
,NetworkDriverAdapter
,NetworkDriverAdapter
,NetworkDriverAdapter
,NetworkDriverAdapter
,NetworkDriverAdapter
,NetworkDriverAdapter
,NetworkDriverAdapter
,RfidNetworkPortController
,SerialNetworkPortAdapter
,SRCPPortController
,XNetNetworkPortController
,XnTcpAdapter
,Z21Adapter
,Z21SimulatorAdapter
public interface NetworkPortAdapter extends PortAdapter
Enables basic setup of a network interface for a jmrix implementation. Based upon work by Bob Jacobsen from SerialPortAdapter- See Also:
NetworkConfigException
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
autoConfigure()
void
configure()
Configure all of the other jmrix widgets needed to work with this adaptervoid
connect(java.lang.String host, int port)
Connects to the end device using a hostname/ip address and portjava.lang.String
getAdvertisementName()
java.lang.String
getCurrentPortName()
java.lang.String
getHostName()
boolean
getMdnsConfigure()
int
getPort()
java.lang.String
getServiceType()
void
setAdvertisementName(java.lang.String AdName)
void
setHostName(java.lang.String hostname)
void
setMdnsConfigure(boolean autoconfig)
void
setPort(int s)
void
setPort(java.lang.String s)
Remember the associated port name.void
setServiceType(java.lang.String ServiceType)
boolean
status()
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 Detail
-
connect
void connect(java.lang.String host, int port) throws java.io.IOException
Connects to the end device using a hostname/ip address and port- Parameters:
host
- hostname / ip address.port
- network port.- Throws:
java.io.IOException
- on connection error.
-
configure
void configure()
Configure all of the other jmrix widgets needed to work with this adapter- Specified by:
configure
in interfacePortAdapter
-
status
boolean status()
Query the status of this connection.- Specified by:
status
in interfacePortAdapter
- Returns:
- true if all is OK, at least as far as known.
-
setPort
void setPort(java.lang.String s)
Remember the associated port name.- Parameters:
s
- port name.
-
setPort
void setPort(int s)
-
getPort
int getPort()
-
getCurrentPortName
java.lang.String getCurrentPortName()
- Specified by:
getCurrentPortName
in interfacePortAdapter
-
setHostName
void setHostName(java.lang.String hostname)
-
getHostName
java.lang.String getHostName()
-
setMdnsConfigure
void setMdnsConfigure(boolean autoconfig)
-
getMdnsConfigure
boolean getMdnsConfigure()
-
autoConfigure
void autoConfigure()
-
setAdvertisementName
void setAdvertisementName(java.lang.String AdName)
-
getAdvertisementName
java.lang.String getAdvertisementName()
-
setServiceType
void setServiceType(java.lang.String ServiceType)
-
getServiceType
java.lang.String getServiceType()
-
-