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) class
LnTcpServer.ClientListener
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addClient(ClientRxHandler handler)
void
addStateListener(LnTcpServerListener l)
void
disable()
void
enable()
int
getClientCount()
static LnTcpServer
getDefault()
Get the default server instance, creating it if necessary.int
getPort()
Get the port this server is using.boolean
isEnabled()
boolean
isSettingChanged()
protected void
removeClient(ClientRxHandler handler)
boolean
removeStateListener(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()
-
-