|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnan.model.ServerSettings
The settings used by the News Server.
Field Summary | |
static int |
DEFAULT_LOCAL_PORT
The default local port for SSH tunnels. |
static int |
DEFAULT_NEWS_PORT
The default news port. |
static java.lang.String |
DEFAULT_NEWS_SERVER
The default news server hostname. |
static int |
DEFAULT_SSH_PORT
The default SSH port. |
static java.lang.String |
XML_DIRECTORY
XML tag for the remote save directory property. |
static java.lang.String |
XML_LOCAL_PORT
XML tag for ssh local port property. |
static java.lang.String |
XML_NEWS_PORT
XML tag for news port property. |
static java.lang.String |
XML_NEWS_SERVER
XML tag for news server property. |
static java.lang.String |
XML_SSH_PORT
XML tag for ssh server port property. |
static java.lang.String |
XML_SSH_SERVER
XML tag for ssh server hostname property. |
static java.lang.String |
XML_SSH_USERNAME
XML tag for ssh username property. |
static java.lang.String |
XML_TAG
XML tag for serialization. |
static java.lang.String |
XML_USE_REMOTE_SAVE
XML tag for the remote save property. |
static java.lang.String |
XML_USE_SSH
XML tag for SSH property. |
static java.lang.String |
XML_USE_TUNNEL
XML tag for the ssh tunnel property. |
Constructor Summary | |
ServerSettings()
Creates a new ServerSettings object. |
Method Summary | |
boolean |
equals(java.lang.Object object)
Tests if this ServerSettings is logically equivalent to another ServerSettings. |
java.lang.String |
getDirectory()
Gets the directory for remote save. |
int |
getLocalPort()
Gets the local port used for the SSH tunnel. |
int |
getNewsPort()
Gets the news server port. |
java.lang.String |
getNewsServer()
Gets the news server hostname. |
java.lang.String |
getPassword()
Gets the SSH password. |
int |
getSSHPort()
Gets the SSH port. |
java.lang.String |
getSSHServer()
Gets the SSH server hostname. |
java.lang.String |
getUsername()
Gets the username for the SSH account. |
void |
setDirectory(java.lang.String directory)
Sets the directory for remote save. |
void |
setLocalPort(int port)
Sets the local port used for the SSH tunnel. |
void |
setNewsPort(int port)
Sets the news server port. |
void |
setNewsServer(java.lang.String newsServer)
Sets the new server hostname. |
void |
setPassword(java.lang.String password)
Sets the password for the SSH account. |
void |
setSSHPort(int port)
Sets the SSH server port. |
void |
setSSHServer(java.lang.String sshServer)
Sets the SSH server hostname. |
void |
setUsername(java.lang.String username)
Sets the SSH username. |
void |
setUseSSH(boolean useSSH)
Sets if SSH is being used. |
java.lang.String |
toString()
Gets a String representation of the ServerSettings. |
org.dom4j.Document |
toXML()
Converts this ServerSettings into an XML Document. |
void |
transpose(java.lang.Object object)
Transposes (copies over) the values of another object of the same type onto this one. |
boolean |
useRemoteSave()
Whether remote save is being used or not. |
boolean |
useSSH()
If SSH is being used. |
boolean |
useTunnel()
Whether an SSH tunnel is being used or not. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String XML_TAG
public static final java.lang.String XML_NEWS_SERVER
public static final java.lang.String XML_NEWS_PORT
public static final java.lang.String XML_USE_SSH
public static final java.lang.String XML_SSH_SERVER
public static final java.lang.String XML_SSH_PORT
public static final java.lang.String XML_SSH_USERNAME
public static final java.lang.String XML_USE_TUNNEL
public static final java.lang.String XML_LOCAL_PORT
public static final java.lang.String XML_USE_REMOTE_SAVE
public static final java.lang.String XML_DIRECTORY
public static final java.lang.String DEFAULT_NEWS_SERVER
public static final int DEFAULT_NEWS_PORT
public static final int DEFAULT_SSH_PORT
public static final int DEFAULT_LOCAL_PORT
Constructor Detail |
public ServerSettings()
Method Detail |
public org.dom4j.Document toXML()
toXML
in interface XMLSerializable
public java.lang.String getNewsServer()
public void setNewsServer(java.lang.String newsServer)
newsServer
- The hostname.public int getNewsPort()
public void setNewsPort(int port) throws InvalidPortException
port
- The port.
InvalidPortException
- if the port is out of range (1 < port
< 65535).public boolean useSSH()
public void setUseSSH(boolean useSSH)
useSSH
- true to use SSH; false otherwise.public java.lang.String getSSHServer()
public void setSSHServer(java.lang.String sshServer)
sshServer
- The hostname.public int getSSHPort()
public void setSSHPort(int port) throws InvalidPortException
port
- The port.
InvalidPortException
- if the port is out of range (1 < port
< 65535).public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- The username.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- The SSH password.public boolean useTunnel()
public int getLocalPort()
public void setLocalPort(int port) throws InvalidPortException
port
- The port.
InvalidPortException
- if the port is out of range (1024 <
port < 65535).public boolean useRemoteSave()
public java.lang.String getDirectory()
public void setDirectory(java.lang.String directory)
directory
- The directory.public boolean equals(java.lang.Object object)
object
- The object to test for equality with.
public void transpose(java.lang.Object object)
transpose
in interface Transposer
object
- The object to transpose over this one.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |