Package jmri.jmrix.ipocs
Class IpocsPortController
java.lang.Object
jmri.jmrix.AbstractPortController
jmri.jmrix.ipocs.IpocsPortController
- All Implemented Interfaces:
IpocsClientListener,PortAdapter
- Since:
- 4.21.2
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrix.AbstractPortController
AbstractPortController.Option -
Field Summary
Fields inherited from class jmri.jmrix.AbstractPortController
allowConnectionRecovery, manufacturerName, opened, option1Name, option2Name, option3Name, option4Name, options, reconnectinterval, reconnectMaxAttempts, reconnectMaxInterval -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(IpocsClientListener clientListener) voidclientConnected(IpocsClientHandler client) voidclientDisconnected(IpocsClientHandler client) voidConfigure all of the other jmrix widgets needed to work with this adapter.voidconnect()Open the connection.Get the InputStream from the port.getLastStatus(String userName) Get the outputStream to the port.shortgetPort()Get theSystemConnectionMemoassociated with this object.voidonMessage(IpocsClientHandler client, Message msg) voidremoveListener(IpocsClientListener clientListener) voidvoidsetPort(short port) Methods inherited from class jmri.jmrix.AbstractPortController
closeConnection, configureOption1, configureOption2, configureOption3, configureOption4, dispose, getDisabled, getManufacturer, getOption1Name, getOption2Name, getOption3Name, getOption4Name, getOptionChoices, getOptionDisplayName, getOptions, getOptionState, getReconnectMaxAttempts, getReconnectMaxInterval, getSystemPrefix, getUserName, isDirty, isOptionAdvanced, isOptionTypePassword, isOptionTypeText, isRestartRequired, purgeStream, reconnect, reconnectFromLoop, recover, resetupConnection, safeSleep, 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.ipocs.IpocsClientListener
getUserName
-
Constructor Details
-
IpocsPortController
-
-
Method Details
-
getSystemConnectionMemo
Description copied from class:AbstractPortControllerGet theSystemConnectionMemoassociated with this object.This method should only be overridden to ensure that a specific subclass of SystemConnectionMemo is returned. The recommended pattern is:
public MySystemConnectionMemo getSystemConnectionMemo() { return (MySystemConnectionMemo) super.getSystemConnectionMemo(); }- Specified by:
getSystemConnectionMemoin interfacePortAdapter- Overrides:
getSystemConnectionMemoin classAbstractPortController- Returns:
- the currently associated SystemConnectionMemo
-
configure
Description copied from interface:PortAdapterConfigure all of the other jmrix widgets needed to work with this adapter.- Specified by:
configurein interfacePortAdapter
-
connect
Description copied from interface:PortAdapterOpen the connection.- Specified by:
connectin interfacePortAdapter- Throws:
IOException- if unable to connect
-
getInputStream
Description copied from class:AbstractPortControllerGet the InputStream from the port.- Specified by:
getInputStreamin interfacePortAdapter- Specified by:
getInputStreamin classAbstractPortController- Returns:
- the InputStream from the port
-
getOutputStream
Description copied from class:AbstractPortControllerGet the outputStream to the port.- Specified by:
getOutputStreamin interfacePortAdapter- Specified by:
getOutputStreamin classAbstractPortController- Returns:
- the outputStream to the port
-
getCurrentPortName
- Specified by:
getCurrentPortNamein interfacePortAdapter- Specified by:
getCurrentPortNamein classAbstractPortController
-
addListener
-
removeListener
-
clientConnected
- Specified by:
clientConnectedin interfaceIpocsClientListener
-
clientDisconnected
- Specified by:
clientDisconnectedin interfaceIpocsClientListener
-
onMessage
- Specified by:
onMessagein interfaceIpocsClientListener
-
send
-
getLastStatus
-
getPort
-
setPort
-