public class RelayServerSettings
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROPERTY_DBSYNC
The property for the db synchronization flag.
|
static java.lang.String |
PROPERTY_DEBUG
The property for the debug flag.
|
static java.lang.String |
PROPERTY_ID
The property for this relay's own id.
|
static java.lang.String |
PROPERTY_NOCONNECTIONS
The property for the flag for disabling platform connections.
|
static java.lang.String |
PROPERTY_PEERS
The property for the peer server urls (comma separated).
|
static java.lang.String |
PROPERTY_URL
The property for this relay's own url.
|
protected java.util.Properties |
props
The properties holding the settings.
|
| Constructor and Description |
|---|
RelayServerSettings()
Create the server settings object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDebugLevel()
Get the debug level.
|
java.lang.String |
getId()
Get the id.
|
java.lang.String |
getInitialPeers()
Get the initial peers.
|
java.lang.String |
getUrl()
Get the url.
|
boolean |
isDBSync()
Get the debug level.
|
boolean |
isNoConnections()
Get the no connections flag.
|
boolean |
isUrlSpecified()
Test if a public url is given.
|
void |
loadSettings(java.io.File file,
boolean create)
Load settings.
|
void |
save(java.io.File file)
Save the settings.
|
public static final java.lang.String PROPERTY_ID
public static final java.lang.String PROPERTY_URL
public static final java.lang.String PROPERTY_PEERS
public static final java.lang.String PROPERTY_DEBUG
public static final java.lang.String PROPERTY_DBSYNC
public static final java.lang.String PROPERTY_NOCONNECTIONS
protected java.util.Properties props
public RelayServerSettings()
public java.lang.String getId()
public boolean isUrlSpecified()
public java.lang.String getUrl()
public java.lang.String getInitialPeers()
public int getDebugLevel()
public boolean isDBSync()
public boolean isNoConnections()
public void loadSettings(java.io.File file,
boolean create)
throws java.lang.Exception
file - The file name to load.create - Flag to indicate that the file should be created, if it does not exist.java.lang.Exceptionpublic void save(java.io.File file)
throws java.lang.Exception
java.lang.Exception