|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.peace_tools.workspace.Server
public class Server
Class to encapsulate information regarding a Server entry in a PEACE work space configuration file. A Server entry represents either a single stand alone machine or the head node of a supercomputing cluster on which Jobs can be run. A server entry encapsulates all the information needed to access the server and run jobs on it. In addition, it also provides the necessary infrastructure for marshaling and un-marshaling data for persisting the information in the work space configuration file.
Nested Class Summary | |
---|---|
static class |
Server.ServerStatusType
Different enumerations defining the last known operational status of a given Server entry. |
Field Summary | |
---|---|
private java.lang.String |
description
A user-assigned description for this server entry. |
private java.lang.String |
ID
A unique identifier for this Server entry. |
private java.lang.String |
installPath
The location on the Server where PEACE is installed and the necessary runtime components of PEACE are located. |
private java.lang.String |
name
The domain name (such as: redhawk.hpc.muohio.edu) or IP address (such as: 134.53.13.131) to be used for accessing the server. |
private java.lang.String |
password
This is a transient field that is never persisted (for security purposes). |
private javax.xml.datatype.Duration |
pollTime
The delay between successive checks for job status on the server. |
private boolean |
remote
This instance variable indicates if this server entry represents a local or a remote server. |
private Server.ServerStatusType |
status
The current operational status of this server. |
private java.lang.String |
userID
The login user ID to be used for accessing remote clusters. |
Constructor Summary | |
---|---|
Server(java.lang.String ID,
java.lang.String name,
java.lang.String description,
java.lang.String userID,
java.lang.String installPath,
javax.xml.datatype.Duration pollTime,
boolean remote)
The constructor. |
Method Summary | |
---|---|
static Server |
create(org.w3c.dom.Element serverNode)
Helper method to utilize data from a DOM tree to create a suitable Server entry. |
java.lang.String |
getDescription()
Obtain the user-specified description for this entry. |
java.lang.String |
getID()
Returns the workspace-unique ID assigned for this server entry. |
java.lang.String |
getInstallPath()
Obtain the directory where the runtime files associated with PEACE are installed on the server. |
java.lang.String |
getName()
Returns the server's domain name (or IP address) set for for this server entry. |
java.lang.String |
getPassword()
Return the password to be used for logging on to a remote server. |
long |
getPollTime()
Obtain the delay between successive polling efforts for this server. |
Server.ServerStatusType |
getStatus()
Obtain the current status set for this server. |
java.lang.String |
getUserID()
Obtain the user ID to be used for logging onto this server. |
boolean |
isRemote()
Method to determine if this Server entry represents a local or a remote server. |
void |
marshall(org.w3c.dom.Element serverList)
Method to marshall the data stored in this object to become part of a DOM tree element passed in. |
void |
marshall(java.io.PrintWriter out)
Method to marshall the data stored in this object directly to a XML fragment. |
void |
setDescription(java.lang.String description)
Change the description set for this server entry. |
protected void |
setID(java.lang.String serverID)
Set the unique ID for this server. |
void |
setInstallPath(java.lang.String path)
Set the directory where the runtime files associated with PEACE are installed on the server. |
void |
setName(java.lang.String name)
Change the server's domain name (or IP address). |
void |
setPassword(java.lang.String password)
Set the password to be used for logging on to a remote server. |
void |
setPollTime(long seconds)
Change the delay between successive polling efforts on status checks on this server. |
void |
setRemote(boolean remote)
Method to set if this server entry represents a local or a remote server. |
void |
setStatus(Server.ServerStatusType status)
Change the status for this server. |
void |
setUserID(java.lang.String userID)
Set the user ID to be used for this server entry. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String ID
private java.lang.String name
private java.lang.String description
private java.lang.String userID
private java.lang.String installPath
private javax.xml.datatype.Duration pollTime
private boolean remote
private Server.ServerStatusType status
private transient java.lang.String password
Constructor Detail |
---|
public Server(java.lang.String ID, java.lang.String name, java.lang.String description, java.lang.String userID, java.lang.String installPath, javax.xml.datatype.Duration pollTime, boolean remote)
ID
- A unique identifier for this Server entry. For new Server
entries this value is obtained via the ServerList.reserveServerID() method.name
- The domain name (or IP address) to be used for accessing
this server. For local machine, this value is simply set to null.description
- A user-assigned description for this server entry.
The description can be anything the user chooses to assign.userID
- The login user ID to be used for accessing remote
clusters. For the local machine, this value is set to null.installPath
- The location on the Server where PEACE is installed
and the necessary runtime components of PEACE are located.pollTime
- The delay between successive checks for job status
on the server.remote
- This flag indicates if this server entry represents
a local server or a remote server.Method Detail |
---|
public static Server create(org.w3c.dom.Element serverNode) throws java.lang.Exception
serverNode
- The DOM element to be used for creating the server
entry and populating with the needed data.
java.lang.Exception
- This method throws an exception when errors occur
during reading and processing elements from the DOM node.public java.lang.String getID()
public java.lang.String getName()
public void setName(java.lang.String name)
Note: Changing the server name does not impact any connections that may be currently open for this server. Note that this method is overridden in the LocalServer class to ignore server name changes.
name
- The new domain name (or IP address) to be set for
this server entry.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- The new description to be set for this entry.
If the new description is null, then the description is reset to
an empty string.public java.lang.String getUserID()
public void setUserID(java.lang.String userID)
Note: Calling this method on a local server entry has no effect.
userID
- The new user ID to be used for logging onto the
remote server.public java.lang.String getInstallPath()
public void setInstallPath(java.lang.String path)
path
- The new install path to be set for this entry.public long getPollTime()
public void setPollTime(long seconds)
seconds
- The delay in seconds to be set between successive
polling efforts (for job status etc.) on this server.public void setPassword(java.lang.String password)
password
- The password to be used for logging onto a
remote server. This value is never persisted but is retained
in memory until this workspace is active.public java.lang.String getPassword()
public boolean isRemote()
public void setRemote(boolean remote)
remote
- The parameter must be true to set it as a remote
server. Otherwise the entry is set as a local server.public void setStatus(Server.ServerStatusType status)
status
- The new status value to be set for this server entry.public Server.ServerStatusType getStatus()
protected void setID(java.lang.String serverID)
serverID
- The unique ID value to be set for the server.public final void marshall(org.w3c.dom.Element serverList)
serverList
- The DOM element corresponding to the ServerList
node that contains this entry.public final void marshall(java.io.PrintWriter out)
out
- The stream to which the XML must be serialized.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |