Class LnTcpServer
- java.lang.Object
-
- jmri.jmrix.loconet.loconetovertcp.LnTcpServer
-
public class LnTcpServer extends java.lang.Object
Implementation of the LocoNetOverTcp LbServer Server Protocol.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classLnTcpServer.ClientListener
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddClient(ClientRxHandler handler)voidaddStateListener(LnTcpServerListener l)voiddisable()voidenable()intgetClientCount()static LnTcpServergetDefault()Get the default server instance, creating it if necessary.intgetPort()Get the port this server is using.booleanisEnabled()booleanisSettingChanged()protected voidremoveClient(ClientRxHandler handler)booleanremoveStateListener(LnTcpServerListener l)
-
-
-
Method Detail
-
getDefault
public static LnTcpServer getDefault()
Get the default server instance, creating it if necessary.- Returns:
- the default LnTcpServer instance
-
isEnabled
public boolean isEnabled()
-
isSettingChanged
public boolean isSettingChanged()
-
enable
public void enable()
-
disable
public void disable()
-
addStateListener
public void addStateListener(LnTcpServerListener l)
-
removeStateListener
public boolean removeStateListener(LnTcpServerListener l)
-
getPort
public int getPort()
Get the port this server is using.- Returns:
- the port
-
addClient
protected void addClient(ClientRxHandler handler)
-
removeClient
protected void removeClient(ClientRxHandler handler)
-
getClientCount
public int getClientCount()
-
-