vqServer API Class vq.server.console

java.lang.Object
    |
    +----java.lang.Thread
            |
            +----vq.server.console
Contents
Package index
Package
API index

public class console
extends java.lang.Thread
Represents a vqServer installation. There can only be one vqServer installation per Java Virtual Machine. console's fields and methods are static and the class does not need to be instantiated.


Variable Index

 o Cache
 

Constructor Index

 o console()
 

Method Index

 o checkHostName()
Attempts to read the server's host name and IP address from the operating system.
 o flushLogs()
Flushes the log files.
 o getAcls()
Returns the list of ACLs.
 o getAdminServer()
Returns the administration server.
 o getAutosaveInterval()
Returns the autosave interval.
 o getCache()
Returns the server's cache.
 o getCacheTimeout()
Returns the cache timeout setting, in seconds.
 o getChanged()
Returns the changed flag.
 o getCheckHostNameAtStartup()
If this returns true, vqServer attempts to read the server computer's host name and IP address from the operating system during console.init().
 o getConsoleStatus()
Returns true if the vqServer console is enabled (or will be enabled).
 o getFiletypes()
Returns the list of file types.
 o getGui()
Returns the Java AWT Frame object that represents the vqServer GUI window or null if the window is not open.
 o getGuiStatus()
Returns true if the vqServer GUI window is open (or will be opened).
 o getHostName()
Returns the server computer's host name that vqServer is using.
 o getIPAddr()
Returns server computer's IP address that vqServer is using.
 o getLibraries()
Returns the list of Java libraries.
 o getLogBackground()
Returns the background logging setting.
 o getMainWebServer()
Returns the main web server.
 o getMaxCacheSize()
Returns the maximum size (in kB) of vqServer's file cache.
 o getMaxFileSize()
Returns the maximum size (in kB) of file that vqServer will cache.
 o getMaxServlets()
Returns the maximum number of servlets that vqServer will keep initialised.
 o getMaxSessionsCached()
Returns the maximum number of sessions that vqServer will keep in memory.
 o getRegKey()
Returns the current registration key.
 o getSaveSessions()
Returns true if sessions are saved when vqServer is shut down.
 o getServers()
Returns the list of servers.
 o getServlets()
Returns the list of servlets.
 o getSessions()
Returns the Sessions object.
 o getSessionsEnabled()
Returns true if session tracking is enabled.
 o getSessionTimeout()
Returns the session timeout, in minutes.
 o getUsers()
Returns the list of users.
 o getVersion()
Returns the vqServer version number.
 o init()
Performs the initialisation necessary after reading the configuration file.
 o killSessions()
Destroys all current sessions.
 o main(String[])
Called when vqServer is invoked from the command line.
 o periodic(long)
Performs certain routine tasks such as checking the cache and saving the configuration file if necessary.
 o quit()
Same as shutdown() Deprecated
 o readCfg()
Reads the vqServer configuration file vq/server/cfg/server.cfg.
 o resetLogs()
Resets the log files.
 o run()
The timer thread's run method.
 o save()
Saves the vqServer configuration file.
 o setAutosaveInterval(long)
Sets the autosave interval.
 o setCacheTimeout(int)
Sets the cache timeout setting, in seconds.
 o setChanged()
Sets the changed flag.
 o setCheckHostNameAtStartup(boolean)
If this is set to true, vqServer attempts to read the server computer's host name and IP address from the operating system during console.init().
 o setHostName(String)
Sets the server computer's host name that vqServer will use.
 o setIPAddr(String)
Sets the server computer's IP address that vqServer will use.
 o setLogBackground(boolean)
Sets the background logging setting.
 o setMaxCacheSize(int)
Sets the maximum size (in kB) of vqServer's file cache.
 o setMaxFileSize(int)
Sets the maximum size (in kB) of file that vqServer will cache.
 o setMaxServlets(int)
Sets the maximum number of servlets that vqServer will keep initialised.
 o setMaxSessionsCached(int)
Sets the maximum number of sessions that vqServer will keep in memory.
 o setRegKey(String)
Sets the current registration key.
 o setSaveSessions(boolean)
Enables or disables saving of sessions when vqServer is shut down.
 o setSessionsEnabled(boolean)
Enables or disables session tracking.
 o setSessionTimeout(long)
Sets the session timeout, in minutes.
 o shutdown()
Shuts down vqServer.
 o startGui()
Opens the vqServer GUI window.
 o startTimer()
Starts the timer thread.
 o startup(boolean, boolean)
Starts vqServer with the specified parameters.
 o startup(boolean, boolean, int, int)
Starts vqServer with the specified parameters.
 o stopGui()
Closes the vqServer GUI window.
 o stopTimer()
Stops the timer thread.

Field Detail

 o Cache
public static Cache Cache

Constructor Detail

 o console
public console()

Method Detail

 o readCfg
public static void readCfg()
          Reads the vqServer configuration file vq/server/cfg/server.cfg. Instantiates vqServer objects as specified in the configuration file. Some objects need initialisation after readCfg(); this is performed by init().
See Also:
init()
 o init
public static void init()
          Performs the initialisation necessary after reading the configuration file. Calls Server.init() for each member of the servers list.
See Also:
readCfg()
 o startTimer
public static void startTimer()
          Starts the timer thread. The timer thread periodically calls console.periodic(long).
See Also:
periodic(long)
 o stopTimer
public static void stopTimer()
          Stops the timer thread.
 o startup
public static void startup(boolean useGui,
                           boolean useConsole,
                           int adminPort,
                           int mainPort)
          Starts vqServer with the specified parameters. The administration server and main web server will both be started. Invokes in sequence
  1. readCfg()
  2. init()
  3. Server.start() for each server if appropriate
  4. startTimer()
  5. startGui()
  6. startConsole()
Parameters:
useGui - if true, the vqServer GUI window is opened
useConsole - if true, the vqServer console is enabled
adminPort - the administration server port
mainPort - the main web server port
 o startup
public static void startup(boolean useGui,
                           boolean useConsole)
          Starts vqServer with the specified parameters.
Parameters:
useGui - if true, the vqServer GUI window is opened
useConsole - if true, the vqServer console is enabled
See Also:
startup(boolean, boolean, int, int)
 o main
public static void main(java.lang.String args[])
          Called when vqServer is invoked from the command line. Parses any command line parameters and calls one of the startup methods.
 o run
public void run()
          The timer thread's run method. It has to be public because of the Runnable interface. Do not call this method.
Overrides:
run in class java.lang.Thread
 o periodic
public static void periodic(long time)
          Performs certain routine tasks such as checking the cache and saving the configuration file if necessary. Calls Servers.periodic(long). Usually called periodically.
Parameters:
time - the current time as returned by System.currentTimeMillis()
 o shutdown
public static void shutdown()
          Shuts down vqServer. Inovkes the sequence
  1. stopTimer()
  2. Servers.updateSavedStatus()
  3. Servers.shutdown()
  4. save()
  5. stops the console thread and the GUI window if necessary
 o quit
public static void quit()
Note: quit() is deprecated.use shutdown() instead

          Same as shutdown()

 o flushLogs
public static void flushLogs()
          Flushes the log files. Calls Servers.flushLogs()
 o resetLogs
public static void resetLogs()
          Resets the log files. Calls Servers.resetLogs()
 o save
public static void save()
          Saves the vqServer configuration file. Also saves session data if necessary and appropriate.
 o getVersion
public static java.lang.String getVersion()
          Returns the vqServer version number.
 o getChanged
public static boolean getChanged()
          Returns the changed flag. If this is true, the configuration file will be saved when shutdown() is called or after the autosave interval.
 o setChanged
public static void setChanged()
          Sets the changed flag. Call after making configuration changes that you want to save to the configuration file.
 o getAutosaveInterval
public static long getAutosaveInterval()
          Returns the autosave interval.
 o setAutosaveInterval
public static void setAutosaveInterval(long newInterval)
          Sets the autosave interval.
 o getLogBackground
public static boolean getLogBackground()
          Returns the background logging setting.
 o setLogBackground
public static void setLogBackground(boolean logAsynch)
          Sets the background logging setting.
 o getHostName
public static java.lang.String getHostName()
          Returns the server computer's host name that vqServer is using.
 o setHostName
public static void setHostName(java.lang.String theName)
          Sets the server computer's host name that vqServer will use.
 o getIPAddr
public static java.lang.String getIPAddr()
          Returns server computer's IP address that vqServer is using.
 o setIPAddr
public static void setIPAddr(java.lang.String theAddr)
          Sets the server computer's IP address that vqServer will use.
 o checkHostName
public static void checkHostName()
          Attempts to read the server's host name and IP address from the operating system.
 o getCheckHostNameAtStartup
public static boolean getCheckHostNameAtStartup()
          If this returns true, vqServer attempts to read the server computer's host name and IP address from the operating system during console.init().
 o setCheckHostNameAtStartup
public static void setCheckHostNameAtStartup(boolean theSetting)
          If this is set to true, vqServer attempts to read the server computer's host name and IP address from the operating system during console.init().
 o getMaxFileSize
public static int getMaxFileSize()
          Returns the maximum size (in kB) of file that vqServer will cache.
 o setMaxFileSize
public static void setMaxFileSize(int theSize)
          Sets the maximum size (in kB) of file that vqServer will cache.
 o getMaxCacheSize
public static int getMaxCacheSize()
          Returns the maximum size (in kB) of vqServer's file cache.
 o setMaxCacheSize
public static void setMaxCacheSize(int theSize)
          Sets the maximum size (in kB) of vqServer's file cache.
 o getCacheTimeout
public static int getCacheTimeout()
          Returns the cache timeout setting, in seconds. This is the interval after which cache entries are regarded as 'stale,' checked against the file system and reloaded if necessary. A value of 0 forces a file system call on every request. A negative value disables cache checking.
 o setCacheTimeout
public static void setCacheTimeout(int newTimeout)
          Sets the cache timeout setting, in seconds.
 o getMaxServlets
public static int getMaxServlets()
          Returns the maximum number of servlets that vqServer will keep initialised.
 o setMaxServlets
public static void setMaxServlets(int maximum)
          Sets the maximum number of servlets that vqServer will keep initialised.
 o getSessionsEnabled
public static boolean getSessionsEnabled()
          Returns true if session tracking is enabled.
 o setSessionsEnabled
public static void setSessionsEnabled(boolean enable)
          Enables or disables session tracking.
 o getSaveSessions
public static boolean getSaveSessions()
          Returns true if sessions are saved when vqServer is shut down.
 o setSaveSessions
public static void setSaveSessions(boolean save)
          Enables or disables saving of sessions when vqServer is shut down.
 o getMaxSessionsCached
public static int getMaxSessionsCached()
          Returns the maximum number of sessions that vqServer will keep in memory. Sessions in excess of this number are saved to disk and restored as required.
 o setMaxSessionsCached
public static void setMaxSessionsCached(int maximum)
          Sets the maximum number of sessions that vqServer will keep in memory. Sessions in excess of this number are saved to disk and restored as required.
 o getSessionTimeout
public static long getSessionTimeout()
          Returns the session timeout, in minutes. If a session is not accessed during this time it will be invalidated and destroyed.
 o setSessionTimeout
public static void setSessionTimeout(long timeout)
          Sets the session timeout, in minutes.
 o killSessions
public static void killSessions()
          Destroys all current sessions.
 o getCache
public static Cache getCache()
          Returns the server's cache.
 o getServers
public static Servers getServers()
          Returns the list of servers.
 o getAdminServer
public static HttpServer getAdminServer()
          Returns the administration server.
 o getMainWebServer
public static HttpServer getMainWebServer()
          Returns the main web server.
 o getServlets
public static Servlets getServlets()
          Returns the list of servlets.
 o getAcls
public static Acls getAcls()
          Returns the list of ACLs.
 o getUsers
public static Users getUsers()
          Returns the list of users.
 o getLibraries
public static Libraries getLibraries()
          Returns the list of Java libraries.
 o getSessions
public static Sessions getSessions()
          Returns the Sessions object. Sessions are shared by all servers.
 o getFiletypes
public static Filetypes getFiletypes()
          Returns the list of file types.
 o getGuiStatus
public static boolean getGuiStatus()
          Returns true if the vqServer GUI window is open (or will be opened).
 o getGui
public static java.awt.Frame getGui()
          Returns the Java AWT Frame object that represents the vqServer GUI window or null if the window is not open. Some applications may need to use the addXxxListener() methods of this object.
 o startGui
public static void startGui()
          Opens the vqServer GUI window.
 o stopGui
public static void stopGui()
          Closes the vqServer GUI window.
 o getConsoleStatus
public static boolean getConsoleStatus()
          Returns true if the vqServer console is enabled (or will be enabled).
 o setRegKey
public static void setRegKey(java.lang.String key)
          Sets the current registration key.
 o getRegKey
public static java.lang.String getRegKey()
          Returns the current registration key.


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