Package jmri.server.json
Class JsonServerPreferences
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.server.json.JsonServerPreferences
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,InstanceManagerAutoDefault
public class JsonServerPreferences extends Bean implements InstanceManagerAutoDefault
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PORT
(package private) static java.lang.String
HEARTBEAT_INTERVAL
(package private) static java.lang.String
PORT
(package private) static java.lang.String
VALIDATE_CLIENT
(package private) static java.lang.String
VALIDATE_SERVER
(package private) static java.lang.String
XML_PREFS_ELEMENT
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description JsonServerPreferences()
JsonServerPreferences(java.lang.String fileName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(JsonServerPreferences prefs)
boolean
compareValuesDifferent(JsonServerPreferences prefs)
int
getHeartbeatInterval()
int
getPort()
boolean
getValidateClientMessages()
Validate that messages from clients are schema valid.boolean
getValidateServerMessages()
Validate that messages from the server are schema valid.boolean
isDirty()
boolean
isRestartRequired()
void
save()
void
setHeartbeatInterval(int value)
void
setPort(int value)
void
setValidateClientMessages(boolean validate)
void
setValidateServerMessages(boolean validate)
-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
XML_PREFS_ELEMENT
static final java.lang.String XML_PREFS_ELEMENT
- See Also:
- Constant Field Values
-
HEARTBEAT_INTERVAL
static final java.lang.String HEARTBEAT_INTERVAL
- See Also:
- Constant Field Values
-
PORT
static final java.lang.String PORT
- See Also:
- Constant Field Values
-
VALIDATE_CLIENT
static final java.lang.String VALIDATE_CLIENT
- See Also:
- Constant Field Values
-
VALIDATE_SERVER
static final java.lang.String VALIDATE_SERVER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JsonServerPreferences
public JsonServerPreferences(java.lang.String fileName)
-
JsonServerPreferences
public JsonServerPreferences()
-
-
Method Detail
-
compareValuesDifferent
public boolean compareValuesDifferent(JsonServerPreferences prefs)
-
apply
public void apply(JsonServerPreferences prefs)
-
save
public void save()
-
isDirty
public boolean isDirty()
-
isRestartRequired
public boolean isRestartRequired()
-
getHeartbeatInterval
public int getHeartbeatInterval()
-
setHeartbeatInterval
public void setHeartbeatInterval(int value)
-
getPort
public int getPort()
-
setPort
public void setPort(int value)
-
getValidateClientMessages
public boolean getValidateClientMessages()
Validate that messages from clients are schema valid.- Returns:
- true if client messages should be validated; false otherwise
-
setValidateClientMessages
public void setValidateClientMessages(boolean validate)
-
getValidateServerMessages
public boolean getValidateServerMessages()
Validate that messages from the server are schema valid.- Returns:
- true if server messages should be validated; false otherwise
-
setValidateServerMessages
public void setValidateServerMessages(boolean validate)
-
-