|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface NetworkPortAdapter
Enables basic setup of a network interface for a jmrix implementation. Based upon work by Bob Jacobsen from SerialPortAdapter
NetworkConfigException| Method Summary | |
|---|---|
void |
configure()
Configure all of the other jmrix widgets needed to work with this adapter |
void |
configureOption1(String value)
Set the first port option. |
void |
configureOption2(String value)
Set the second port option. |
void |
connect()
|
void |
connect(String host,
int port)
Connects to the end device using a hostname/ip address and port |
String |
getCurrentOption1Setting()
|
String |
getCurrentOption2Setting()
Get current option 2 value |
String |
getCurrentPortName()
|
String |
getHostName()
|
int |
getPort()
|
String |
option1Name()
Get a String that says what Option 1 represents May be an empty string, but will not be null |
String |
option2Name()
Get a String that says what Option 2 represents May be an empty string, but will not be null |
void |
setHostName(String hostname)
|
void |
setPort(int s)
|
void |
setPort(String s)
Remember the associated port name |
boolean |
status()
Query the status of this connection. |
String[] |
validOption1()
Get an array of valid values for "option 1"; used to display valid options. |
String[] |
validOption2()
Get an array of valid values for "option 2"; used to display valid options. |
| Methods inherited from interface jmri.jmrix.PortAdapter |
|---|
dispose, getDisabled, getInputStream, getManufacturer, getOutputStream, getSystemConnectionMemo, setDisabled, setManufacturer |
| Method Detail |
|---|
void connect(String host,
int port)
throws Exception
Exception
void connect()
throws Exception
Exceptionvoid configure()
configure in interface PortAdapterboolean status()
status in interface PortAdaptervoid setPort(String s)
s - void setPort(int s)
int getPort()
String getCurrentPortName()
getCurrentPortName in interface PortAdaptervoid setHostName(String hostname)
String getHostName()
String[] validOption1()
validOption1 in interface PortAdapterString option1Name()
option1Name in interface PortAdaptervoid configureOption1(String value)
configureOption1 in interface PortAdapterString getCurrentOption1Setting()
getCurrentOption1Setting in interface PortAdapterString[] validOption2()
validOption2 in interface PortAdapterString option2Name()
option2Name in interface PortAdaptervoid configureOption2(String value)
configureOption2 in interface PortAdapterString getCurrentOption2Setting()
getCurrentOption2Setting in interface PortAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||