Class sun.server.http.HttpServer
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.http.HttpServer

java.lang.Object
   |
   +----sun.server.Server
           |
           +----sun.server.http.HttpServer

public class HttpServer
extends Server
Base class for http servers.

Method Index

 o addAccessConfiguration(String, String, String, String)
This method can be called to protect a specified resource.
 o applyRules(String)
Applies servlet rules to specified virtual path.
 o checkAccessConfiguration(String, HttpRequest)
Checks the incoming request for authentication and authorization.
 o createHandler()
Creates a new HTTP connection handler.
 o error(String)
Issues an error message and returns.
 o error(String, Exception)
Issues an error message with exception stack trace and returns.
 o exit(int)
Exits the server with the specified return code.
 o fatal(String)
Issues a fatal error message and then exits.
 o fatal(String, Exception)
Issues a fatal error message with exception stack trace and then exits.
 o getErrorServlet()
 o getMimeType(String)
Returns the mime type of the specified file.
 o getRealPath(String)
Applies alias rules to the specified virtual path and returns the corresponding real path.
 o getRealPath(String, String)
Applies alias rules to the specified virtual path and returns the corresponding real path.
 o getServerRoot()
Returns server root directory.
 o isNtService()
Returns if Jeeves should be running as an NT Service.
 o main(String[])
Main function
 o restart()
Restarts the server.
 o run()
Runs the HTTP server.
 o shutdown()
Shuts down the server.

Methods

 o run
  public void run()
Runs the HTTP server.
Overrides:
run in class Server
 o exit
  public void exit(int r)
Exits the server with the specified return code.
Parameters:
r - the return code
 o getServerRoot
  public String getServerRoot()
Returns server root directory.
 o applyRules
  public RulesOutput applyRules(String path)
Applies servlet rules to specified virtual path. Returns the rules output for the servlet, or null if none.
 o getRealPath
  public String getRealPath(String path)
Applies alias rules to the specified virtual path and returns the corresponding real path. The server installation directory is used as the document Root.
 o getRealPath
  public String getRealPath(String path,
                            String docRoot)
Applies alias rules to the specified virtual path and returns the corresponding real path. The document Root is supplied as an argument.
 o addAccessConfiguration
  public void addAccessConfiguration(String resource,
                                     String scheme,
                                     String realm,
                                     String aclName) throws AccessConfigurationException, IOException
This method can be called to protect a specified resource. Only trusted servlets can call this method. It maps the specified resource with the specified authentication scheme and the specified acl name in the specified realm.
Parameters:
resource - the name of the resource that needs to be protected.
scheme - the name of the authentication scheme that is to be used when controlling access to this resource.
realm - the name of the realm to use when controlling access to this resource
aclName - the name of the acl that guards this resource.
Throws: AccessConfigurationException
if the scheme, realm or acl is invalid
Throws: IOException
if the keyfile, acl or groupfile in the realm cannot be read
 o checkAccessConfiguration
  public boolean checkAccessConfiguration(String name,
                                          HttpRequest req)
Checks the incoming request for authentication and authorization.
Parameters:
the - name of the resource whose ACL should be checked
req - the http request structure
 o getMimeType
  public String getMimeType(String name)
Returns the mime type of the specified file.
 o getErrorServlet
  public ErrorServlet getErrorServlet()
 o createHandler
  protected ServerHandler createHandler()
Creates a new HTTP connection handler.
Overrides:
createHandler in class Server
 o isNtService
  protected boolean isNtService()
Returns if Jeeves should be running as an NT Service. True if running on an NT platform and the "ntservice" switch is not disabled in httpd.properties. (Default ntservice value is true).
 o fatal
  public void fatal(String s)
Issues a fatal error message and then exits.
Overrides:
fatal in class Server
 o fatal
  public void fatal(String s,
                    Exception e)
Issues a fatal error message with exception stack trace and then exits.
Overrides:
fatal in class Server
 o error
  public void error(String s)
Issues an error message and returns.
Overrides:
error in class Server
 o error
  public void error(String s,
                    Exception e)
Issues an error message with exception stack trace and returns.
Overrides:
error in class Server
 o shutdown
  public void shutdown()
Shuts down the server.
Overrides:
shutdown in class Server
 o restart
  public void restart()
Restarts the server.
 o main
  public static void main(String argv[])
Main function

All Packages  Class Hierarchy  This Package  Previous  Next  Index