All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.ServletInfo

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

public abstract 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 callServletService(String, ServletRequest, ServletResponse)
Call the service method for the named servlet, loading the servlet if it is not loaded already and calling init before calling service - if not called already.
 o destroyLoadedServlets()
Destroy all loaded servlets.
 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 getServletConfig(Properties)
 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
 o logEvent(int, String)
Logs the event
 o removeServlet(String)
Remove the named servlet, if it exists.
 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

 o logEvent
 protected abstract void logEvent(int logLevel,
                                  String s)
Logs the event

 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.

 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 callServletService
 public void callServletService(String name,
                                ServletRequest req,
                                ServletResponse res) throws ServletException, IOException
Call the service method for the named servlet, loading the servlet if it is not loaded already and calling init before calling service - if not called already.

Throws: ServletException
as reported by the servlet
Throws: IOException
as reported by the servlet
 o getAndLoadServlet
 public Servlet getAndLoadServlet(String name) throws ServletException
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
Throws: ServletException
as reported by a servlet if it needs to be initialized
 o loadServlet
 protected Servlet loadServlet(String servletName) throws ServletException, InstantiationException
load one servlet given name

Returns:
the servlet
Throws: ServletException
if reported by servlet
Throws: InstantiationException
for other instantiation problems
 o loadServlet
 public Servlet loadServlet(String servletName,
                            String code,
                            String codebase,
                            String argsString) throws ServletException, ClassNotFoundException, InstantiationException, IllegalAccessException
Load one servlet.

Returns:
the servlet
Throws: ServletException
if reported by servlet
Throws: ClassNotFoundException
if servlet class doesn't exist
Throws: InstantiationException
for other instantiation problems
Throws: IllegalAccessException
if the servlet constructor is not public
 o loadServlet
 public synchronized Servlet loadServlet(String servletName,
                                         String code,
                                         String codebase,
                                         Properties argsProperties) throws ServletException, ClassNotFoundException, InstantiationException, IllegalAccessException
Load one servlet.

Returns:
the servlet
Throws: ServletException
if reported by servlet
Throws: ClassNotFoundException
if servlet class doesn't exist
Throws: InstantiationException
for other instantiation problems
Throws: IllegalAccessException
if the servlet constructor is not public
 o removeServlet
 public void removeServlet(String name)
Remove the named servlet, if it exists.

Parameters:
name - servlet's name
 o destroyLoadedServlets
 public synchronized void destroyLoadedServlets()
Destroy all loaded servlets.

 o save
 protected synchronized void save()
Saves the properties

 o getServletConfig
 protected ServletConfig getServletConfig(Properties argsProps)

All Packages  Class Hierarchy  This Package  Previous  Next  Index