|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.peace_tools.workspace.ServerList
public class ServerList
A class to encapsulate information about a list of servers that have already been configured in this work space. This class is instantiated from the Work space class. This class is relatively straightforward in that it merely contains a list of Servers. In addition, it facilitates marshalling and unmarshalling of server data.
Field Summary | |
---|---|
private long |
seqCounter
Sequence counter that is maintained on a per-work space basis to generate unique/valid IDs for each new server entry added to this list. |
private java.util.ArrayList<Server> |
servers
The list of Server objects that have been configured and added to this list. |
Constructor Summary | |
---|---|
ServerList()
The default constructor. |
Method Summary | |
---|---|
void |
add(Server server)
Method to add a new server entry to this server list. |
static ServerList |
create(org.w3c.dom.Element serverNode)
Helper method to utilize data from a DOM tree to create a suitable ServerList entry. |
Server |
getServer(java.lang.String serverID)
Obtain reference to a Server object, given its work space wide unique server ID. |
java.util.ArrayList<Server> |
getServers()
Obtain the list of Server objects that are currently available in a work space. |
void |
marshall(org.w3c.dom.Element workspace)
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 fragement. |
void |
remove(Server server)
Method to remove a server entry to this server list. |
java.lang.String |
reserveServerID()
Reserves the next server ID for use in a server object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList<Server> servers
private long seqCounter
Constructor Detail |
---|
public ServerList()
Method Detail |
---|
public static ServerList create(org.w3c.dom.Element serverNode) throws java.lang.Exception
serverNode
- The DOM element to be used for creating the
server list and to be used for creating the Server entries.
java.lang.Exception
- This method throws an exception when errors occur
during reading and processing elements from the DOM node.public java.lang.String reserveServerID()
public void add(Server server)
server
- The new server entry to be added.public void remove(Server server)
server
- The new server entry to be removed.public Server getServer(java.lang.String serverID)
serverID
- The generated work space wide unique server ID.
Note that checks are case sensitive.
public java.util.ArrayList<Server> getServers()
public final void marshall(org.w3c.dom.Element workspace)
workspace
- The DOM element corresponding to the Workspace
node that contains this entry.public final void marshall(java.io.PrintWriter out)
out
- The stream to which the XML must be serialized.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |