vqServer API Class vq.server.Server

java.lang.Object
    |
    +----vq.utils.klentry
            |
            +----vq.server.Server
Contents
Package index
Package
API index

public class Server
extends klentry
implements java.awt.event.ItemListener
Represents a generic server. Each server listens on a different TCP/IP port. All of the methods are overriden by specific server types. There is no public constructor. Warning: the key field is used to store a unique identifier and should not be modified. You cannot at present subclass or extend Server.


Method Index

 o flushLogs()
Flushes the server's logs.
 o getName()
Returns the server's name.
 o getPort()
Returns the TCP/IP port on which the server listens for incoming requests.
 o getSavedStatus()
Returns the server's status as read from or will be saved to the configuration file.
 o getStatus()
Returns true if the server is running.
 o init()
Performs any initialisation required after the configuration file has been read.
 o itemStateChanged(ItemEvent)
Responds to changes in the state of the server's check mark in the GUI window servers pull-down menu.
 o kill()
Kills the server.
 o periodic(long)
Performs certain time-dependent tasks such as checking for timed-out connections.
 o resetLogs(String)
Resets the server's logs.
 o setName(String)
Sets the server's name.
 o setPort(int)
Sets the TCP/IP port on which the server listens for incoming requests.
 o setSavedStatus(boolean)
Sets the server's status as it will be saved to the configuration file.
 o start()
Starts the server.
 o stop()
Stops the server.
 o updateSavedStatus()
Updates the server's status as it will be saved to the configuration file to reflect the server's current status.

Method Detail

 o itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent tevent)
          Responds to changes in the state of the server's check mark in the GUI window servers pull-down menu. It has to be public because of the ItemListener interface. Do not call this method.
 o kill
public void kill()
          Kills the server. Warning: do not invoke this method if the server is a member of a list.
Overrides:
kill in class klentry
 o init
public void init()
          Performs any initialisation required after the configuration file has been read.
 o start
public void start()
          Starts the server.
 o stop
public void stop()
          Stops the server.
 o getStatus
public boolean getStatus()
          Returns true if the server is running.
 o getSavedStatus
public boolean getSavedStatus()
          Returns the server's status as read from or will be saved to the configuration file.
 o setSavedStatus
public void setSavedStatus(boolean newStatus)
          Sets the server's status as it will be saved to the configuration file.
 o updateSavedStatus
public void updateSavedStatus()
          Updates the server's status as it will be saved to the configuration file to reflect the server's current status.
 o getPort
public int getPort()
          Returns the TCP/IP port on which the server listens for incoming requests.
 o setPort
public void setPort(int thePort)
          Sets the TCP/IP port on which the server listens for incoming requests. If the server is running it is first shut down and then restarted.
 o getName
public java.lang.String getName()
          Returns the server's name.
 o setName
public void setName(java.lang.String newName)
          Sets the server's name.
 o periodic
public void periodic(long currentTime)
          Performs certain time-dependent tasks such as checking for timed-out connections. Called periodically by the timer thread.
Parameters:
currentTime - the current time as returned by System.currentTimeMillis()
 o flushLogs
public void flushLogs()
          Flushes the server's logs.
 o resetLogs
public void resetLogs(java.lang.String theExtension)
          Resets the server's logs.


vqServer API version 1.9. vqServer and the vqServer API are copyright © Steve Shering and vqSoft 1997-2000. Last updated 15 May 2000.

Contents
Package index
Package
API index