All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.ServletInfo

java.lang.Object
   |
   +----sun.server.ServletInfo

public class ServletInfo
extends Object
This class holds information about the servlets running on the server.


Variable Index

 o localServlets
Local Class Loader
 o localServletsDir
 o service
Service
 o SERVLET_DIR
Directory name
 o SERVLET_PREFIX
Property prefix for servlets
 o servletContext
Servlet Context
 o servletProperties
Properties
 o SERVLETS_STARTUP
Property key for startup properties
 o servletStartup
Servlets that automatically start up

Constructor Index

 o ServletInfo(Service)
Creates new ServletInfo

Method Index

 o addServletStartup(String)
Adds servletName to the list of servlets to be started at startup Currently does not check if servletName is already in the list
 o getAndLoadServlet(String)
Returns the servlet corresponding to the specified name; if it is not loaded it tries to load.
 o getLoadedServlets()
Gets the servletHashtable
 o getServlet(String)
Returns the servlet corresponding to the specified name, or null if it is not loaded
 o getServletProperties()
Gets the servletProperties
 o isAutoloaded(String)
Check if servletName is in the list of servlets to be started at startup
 o loadServlet(String)
load one servlet given name
 o loadServlet(String, String, String, Properties)
Load one servlet.
 o loadServlet(String, String, String, String)
load one servlet
 o loadStartupServlets()
Loads the servlets specified by "servlets.startup" in servlets.properties.
 o logError(Exception)
Logs the exception XXX: We should have logs in the server level for these things.
 o logEvent(int, String)
Logs the event XXX: We should have logs in the server level for these things.
 o removeServlet(String)
Remove the servlet.
 o removeServletStartup(String)
Remove servletName from the list of servlets to be started at startup
 o save()
Saves the properties
 o updateProperties(ExProperties)
Called when properties are updated from the admin UI.

Variables

 o service
  protected Service service
Service

 o servletProperties
  protected ExProperties servletProperties
Properties

 o servletStartup
  protected String servletStartup
Servlets that automatically start up

 o servletContext
  protected ServletContext servletContext
Servlet Context

 o localServlets
  protected ClassLoader localServlets
Local Class Loader

 o SERVLETS_STARTUP
  protected String SERVLETS_STARTUP
Property key for startup properties

 o SERVLET_PREFIX
  protected String SERVLET_PREFIX
Property prefix for servlets

 o SERVLET_DIR
  protected String SERVLET_DIR
Directory name

 o localServletsDir
  protected String localServletsDir

Constructors

 o ServletInfo
  public ServletInfo(Service service) throws IOException
Creates new ServletInfo

Parameters:
service - service

Methods

 o logError
  protected abstract void logError(Exception e)
Logs the exception XXX: We should have logs in the server level for these things.

 o logEvent
  protected abstract void logEvent(int logLevel,
                                   String s)
Logs the event XXX: We should have logs in the server level for these things.

 o updateProperties
  public void updateProperties(ExProperties props)
Called when properties are updated from the admin UI.

Parameters:
props - properties
 o getServletProperties
  public Properties getServletProperties()
Gets the servletProperties

Returns:
servlet properties
 o getLoadedServlets
  public Enumeration getLoadedServlets()
Gets the servletHashtable

Returns:
servlet hashtable
 o loadStartupServlets
  public void loadStartupServlets()
Loads the servlets specified by "servlets.startup" in servlets.properties. XXX: HttpService calls this method. should move up to Server level.

 o addServletStartup
  public void addServletStartup(String servletName)
Adds servletName to the list of servlets to be started at startup Currently does not check if servletName is already in the list

 o removeServletStartup
  public void removeServletStartup(String servletName)
Remove servletName from the list of servlets to be started at startup

 o isAutoloaded
  public boolean isAutoloaded(String servletName)
Check if servletName is in the list of servlets to be started at startup

 o getServlet
  public Servlet getServlet(String name)
Returns the servlet corresponding to the specified name, or null if it is not loaded

 o getAndLoadServlet
  public Servlet getAndLoadServlet(String name)
Returns the servlet corresponding to the specified name; if it is not loaded it tries to load.

Returns:
the servlet or null if cannot load
 o loadServlet
  protected Servlet loadServlet(String servletName) throws Exception
load one servlet given name

Returns:
the servlet
Throws: Exception
error
 o loadServlet
  public Servlet loadServlet(String servletName,
                             String code,
                             String codebase,
                             String argsString) throws Exception
load one servlet

Returns:
the servlet
Throws: Exception
if servlet cannot be loaded
 o loadServlet
  protected Servlet loadServlet(String servletName,
                                String code,
                                String codebase,
                                Properties argsProperties) throws Exception
Load one servlet.

Returns:
the servlet
Throws: Exception
if servlet cannot be loaded XXX: When Dispatcher and other things move up to Server level, the implementation of this method should be moved from HttpServletInfo to this class.
 o removeServlet
  public synchronized void removeServlet(String name) throws Exception
Remove the servlet.

Throws: Exception
if servlet cannot be loaded
 o save
  protected synchronized void save()
Saves the properties


All Packages  Class Hierarchy  This Package  Previous  Next  Index