vqServer API Class vq.server.Alias

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

public class Alias
extends klentry
implements javax.servlet.ServletConfig
Represents a vqServer alias. Implements javax.servlet.ServletConfig. Warning: the key field is used to store the name of the alias and should not be modified directly. Use setName() and getName() instead.

See Also:
javax.servlet.ServletConfig

Variable Index

 o REDIRECT
In an alias's action field, this constant specifies that matching requests will result in a redirection response.
 o RUNCGI
In an alias's action field, this constant specifies that matching requests will invoke a CGI script.
 o RUNSERVLET
In an alias's action field, this constant specifies that matching requests will invoke a servlet.
 o SERVEFILE
In an alias's action field, this constant specifies that matching requests will result in a file being served.

Constructor Index

 o Alias()
Creates a new alias.

Method Index

 o getAction()
Returns an integer corresponding to the action for the alias.
 o getDefaultFile()
Returns the default file.
 o getDirListAllowed()
Returns true if directory listings are enabled for the alias.
 o getFilter()
Returns the (list of) filter servlet specification(s) associated with the alias.
 o getInitParameter(String)
Returns the value of the initialisation parameter specified or null if an initialisation parameter with this name does not exist.
 o getInitParameterNames()
Returns an enumeration of the initialization parameters for the alias.
 o getInitParameters()
Returns the alias's initialisation parameters which can be maniplulated and modified using kvlist methods.
 o getName()
Returns the name of the alias.
 o getNeverDestroy()
Returns the never destroy setting of the alias.
 o getPath()
Returns the real name of the alias.
 o getPreload()
Returns the preload setting of the alias.
 o getReadAcl()
Returns the read ACL of the alias.
 o getServletContext()
Returns the ServletContext for the alias.
 o getWriteAcl()
Returns the write ACL of the alias.
 o kill()
Kills the alias.
 o save(vqos)
Writes the alias to the output stream specified in vqServer .cfg file format.
 o setAction(int)
Sets the action associated with the alias.
 o setDefaultFile(String)
Sets the default file to the file name specified.
 o setDirListAllowed(boolean)
Enables or disables directory listings for the alias.
 o setFilter(String)
Sets the (list of) filter servlet specification(s) associated with the alias.
 o setName(String)
Sets the name of the alias to the value specified.
 o setNeverDestroy(boolean)
Sets the never destroy setting for the alias.
 o setPath(String)
Sets the real name or path of the alias to the value specified.
 o setPreload(boolean)
Sets the preload setting for the alias.
 o setReadAcl(Acl)
Sets the read ACL of the alias.
 o setWriteAcl(Acl)
Sets the write ACL of the alias.

Field Detail

 o RUNSERVLET
public static final int RUNSERVLET
          In an alias's action field, this constant specifies that matching requests will invoke a servlet.
 o REDIRECT
public static final int REDIRECT
          In an alias's action field, this constant specifies that matching requests will result in a redirection response.
 o SERVEFILE
public static final int SERVEFILE
          In an alias's action field, this constant specifies that matching requests will result in a file being served.
 o RUNCGI
public static final int RUNCGI
          In an alias's action field, this constant specifies that matching requests will invoke a CGI script.

Constructor Detail

 o Alias
public Alias()
          Creates a new alias.

Method Detail

 o kill
public void kill()
          Kills the alias. Warning: do not invoke this method if the alias is a member of a list.
Overrides:
kill in class klentry
 o save
public void save(vqos os) throws java.io.IOException
          Writes the alias to the output stream specified in vqServer .cfg file format.
Overrides:
save in class klentry
 o getServletContext
public javax.servlet.ServletContext getServletContext()
          Returns the ServletContext for the alias. This is actually the HttpServer to which the alias belongs and can be cast accordingly. A ServletConfig method.
 o getInitParameter
public java.lang.String getInitParameter(java.lang.String name)
          Returns the value of the initialisation parameter specified or null if an initialisation parameter with this name does not exist. A ServletConfig method.
Parameters:
name - the parameter name
 o getInitParameterNames
public java.util.Enumeration getInitParameterNames()
          Returns an enumeration of the initialization parameters for the alias. A ServletConfig method.
 o getInitParameters
public Parameters getInitParameters()
          Returns the alias's initialisation parameters which can be maniplulated and modified using kvlist methods.
 o getName
public java.lang.String getName()
          Returns the name of the alias. The name of the alias is the string which is compared to the names of files requested by client browsers.
 o setName
public void setName(java.lang.String name)
          Sets the name of the alias to the value specified. The name is checked and modified according to vqServer's standard rules. If the alias belongs to an HttpServer the server's aliases are reordered automatically.
 o getPath
public java.lang.String getPath()
          Returns the real name of the alias. This is used to translate a requested file name into an actual file name.
 o setPath
public void setPath(java.lang.String thePath)
          Sets the real name or path of the alias to the value specified. The path is checked and modified according to vqServer's standard rules and this method may result in a change in the alias's name.
 o getDefaultFile
public java.lang.String getDefaultFile()
          Returns the default file. This is the file which is sent if a request corresponds to a directory.
 o setDefaultFile
public void setDefaultFile(java.lang.String theFile)
          Sets the default file to the file name specified.
 o getAction
public int getAction()
          Returns an integer corresponding to the action for the alias. The value returned will be one of RUNSERVLET, REDIRECT, SERVEFILE and RUNCGI.
 o setAction
public void setAction(int theAction)
          Sets the action associated with the alias. The parameter must be one of be one of RUNSERVLET, REDIRECT, SERVEFILE and RUNCGI.
 o getFilter
public java.lang.String getFilter()
          Returns the (list of) filter servlet specification(s) associated with the alias.
 o setFilter
public void setFilter(java.lang.String theFilter)
          Sets the (list of) filter servlet specification(s) associated with the alias.
 o getDirListAllowed
public boolean getDirListAllowed()
          Returns true if directory listings are enabled for the alias.
 o setDirListAllowed
public void setDirListAllowed(boolean allowed)
          Enables or disables directory listings for the alias.
 o getPreload
public boolean getPreload()
          Returns the preload setting of the alias. If this is true (and the alias corresponds to a single servlet) the servlet will be initialised when vqServer starts.
 o setPreload
public void setPreload(boolean newSetting)
          Sets the preload setting for the alias.
 o getNeverDestroy
public boolean getNeverDestroy()
          Returns the never destroy setting of the alias. If this is true (and the alias corresponds to a single servlet) the servlet will never be destroyed because the number of initialsed servlets excedes vqServer's maximum servlets setting.
 o setNeverDestroy
public void setNeverDestroy(boolean newSetting)
          Sets the never destroy setting for the alias.
 o getReadAcl
public Acl getReadAcl()
          Returns the read ACL of the alias. null means that anyone can submit a request corresponding to the alias. Warning: if the alias is read from a .cfg file this method returns null until console.init() is called.
 o setReadAcl
public void setReadAcl(Acl theAcl)
          Sets the read ACL of the alias. The ACL must be a member of an ACLs before this method is invoked.
 o getWriteAcl
public Acl getWriteAcl()
          Returns the write ACL of the alias. null means that anyone can save files (using the HTTP PUT method) corresponding to the alias. Warning: if the alias is read from a .cfg file this method returns null until console.init() is called.
 o setWriteAcl
public void setWriteAcl(Acl theAcl)
          Sets the write ACL of the alias. The ACL must be a member of an ACLs before this method is invoked.


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