Package jmri.jmrix.dccpp.dccppovertcp
Class Server
- java.lang.Object
-
- jmri.jmrix.dccpp.dccppovertcp.Server
-
public class Server extends java.lang.Object
Implementation of the DCCppOverTcp Server Protocol.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
Server.ClientListener
static class
Server.Initializer
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.String
AUTO_START_KEY
(package private) static java.lang.String
PORT_NUMBER_KEY
(package private) java.net.ServerSocket
serverSocket
(package private) ZeroConfService
service
(package private) static java.lang.String
SETTINGS_FILE_NAME
(package private) boolean
settingsChanged
(package private) boolean
settingsLoaded
(package private) java.lang.Runnable
shutDownTask
(package private) java.lang.Thread
socketListener
(package private) ServerListner
stateListner
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addClient(ClientRxHandler handler)
void
disable()
void
enable()
boolean
getAutoStart()
int
getClientCount()
int
getPortNumber()
boolean
isEnabled()
boolean
isSettingChanged()
protected void
removeClient(ClientRxHandler handler)
void
saveSettings()
void
setAutoStart(boolean start)
void
setPortNumber(int port)
void
setStateListner(ServerListner l)
void
updateClinetStateListener()
void
updateServerStateListener()
-
-
-
Field Detail
-
socketListener
java.lang.Thread socketListener
-
serverSocket
java.net.ServerSocket serverSocket
-
settingsLoaded
boolean settingsLoaded
-
stateListner
ServerListner stateListner
-
settingsChanged
boolean settingsChanged
-
shutDownTask
java.lang.Runnable shutDownTask
-
service
ZeroConfService service
-
AUTO_START_KEY
static final java.lang.String AUTO_START_KEY
- See Also:
- Constant Field Values
-
PORT_NUMBER_KEY
static final java.lang.String PORT_NUMBER_KEY
- See Also:
- Constant Field Values
-
SETTINGS_FILE_NAME
static final java.lang.String SETTINGS_FILE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
setStateListner
public void setStateListner(ServerListner l)
-
saveSettings
public void saveSettings()
-
getAutoStart
public boolean getAutoStart()
-
setAutoStart
public void setAutoStart(boolean start)
-
getPortNumber
public int getPortNumber()
-
setPortNumber
public void setPortNumber(int port)
-
isEnabled
public boolean isEnabled()
-
isSettingChanged
public boolean isSettingChanged()
-
enable
public void enable()
-
disable
public void disable()
-
updateServerStateListener
public void updateServerStateListener()
-
updateClinetStateListener
public void updateClinetStateListener()
-
addClient
protected void addClient(ClientRxHandler handler)
-
removeClient
protected void removeClient(ClientRxHandler handler)
-
getClientCount
public int getClientCount()
-
-