- public class Servers
- extends kllist
Represents a list of servers. Ordered by TCP/IP port number.
Warning:
vqServer will not operate correctly if you add
anything other than instances of descendants of Server to an instance of Servers.
Use add(Server) to add instances of Server to an instance of Servers.
Instances of Servers assume that they are the main list of servers associated with
the vqServer console and GUI window. There can therefore only be one instance of
Servers per virtual machine.
Servers()
- Creates an empty list.
add(Server)
- Adds the specified server to the list.
flushLogs()
- Flushes the logs of each server in the list.
periodic(long)
- Performs certain time-dependent tasks such as checking for
timed-out connections.
read(vqis)
- Reads a list of server specifications from the specified file and adds them to the list.
remove(Server)
- Removes the specified server from the list.
resetLogs(String)
- Resets the logs of each server in the list.
save(vqos)
- Writes the list to the output stream specified in vqServer .cfg file format.
shutdown()
- Shuts down each server in the list.
updateSavedStatus()
- Updates the saved status of each server in the list.
Servers
public Servers()
Creates an empty list.
read
public void read(vqis is) throws java.io.IOException
Reads a list of server specifications from the specified file and adds them to the list.
- Overrides:
- read in class kllist
add
public void add(Server newServer)
Adds the specified server to the list. The position of the server in the list depends
on its port number.
remove
public void remove(Server theServer)
Removes the specified server from the list. The server
is not automatically shut down before it is removed.
save
public void save(vqos os) throws java.io.IOException
Writes the list to the output stream specified in vqServer .cfg file format.
Calls the save(vqos) method of each server in the list.
- Overrides:
- save in class kllist
periodic
public void periodic(long currentTime)
Performs certain time-dependent tasks such as checking for
timed-out connections.
Calls the periodic(long) method of each server in the list.
Called periodically by the timer thread.
- Parameters:
currentTime
- the current time as returned by System.currentTimeMillis()
updateSavedStatus
public void updateSavedStatus()
Updates the saved status of each server in the list.
Calls each server's updateSavedStatus() method.
shutdown
public void shutdown()
Shuts down each server in the list.
Calls each server's stop() method.
flushLogs
public void flushLogs()
Flushes the logs of each server in the list.
Calls each server's flushLogs() method.
resetLogs
public void resetLogs(java.lang.String theExtension)
Resets the logs of each server in the list.
Calls each server's resetLogs() method.