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.
-
localServlets
- Local Class Loader
-
localServletsDir
-
-
service
- Service
-
SERVLET_DIR
- Directory name
-
SERVLET_PREFIX
- Property prefix for servlets
-
servletContext
- Servlet Context
-
servletProperties
- Properties
-
SERVLETS_STARTUP
- Property key for startup properties
-
servletStartup
- Servlets that automatically start up
-
ServletInfo(Service)
- Creates new ServletInfo
-
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
-
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.
-
destroyLoadedServlets()
- Destroy all loaded servlets.
-
getAndLoadServlet(String)
- Returns the servlet corresponding to the specified name;
if it is not loaded it tries to load.
-
getLoadedServlets()
- Gets the servletHashtable
-
getServlet(String)
- Returns the servlet corresponding to the specified name,
or null if it is not loaded
-
getServletConfig(Properties)
-
-
getServletProperties()
- Gets the servletProperties
-
isAutoloaded(String)
- Check if servletName is in the list of servlets to be started at startup
-
loadServlet(String)
- load one servlet given name
-
loadServlet(String, String, String, Properties)
- Load one servlet.
-
loadServlet(String, String, String, String)
- Load one servlet.
-
loadStartupServlets()
- Loads the servlets specified by "servlets.startup" in
servlets.properties.
-
logError(Exception)
- Logs the exception
-
logEvent(int, String)
- Logs the event
-
removeServlet(String)
- Remove the named servlet, if it exists.
-
removeServletStartup(String)
- Remove servletName from the list of servlets to be started at startup
-
save()
- Saves the properties
-
updateProperties(ExProperties)
- Called when properties are updated from the admin UI.
service
protected Service service
- Service
servletProperties
protected ExProperties servletProperties
- Properties
servletStartup
protected String servletStartup
- Servlets that automatically start up
servletContext
protected ServletContext servletContext
- Servlet Context
localServlets
protected ClassLoader localServlets
- Local Class Loader
SERVLETS_STARTUP
protected String SERVLETS_STARTUP
- Property key for startup properties
SERVLET_PREFIX
protected String SERVLET_PREFIX
- Property prefix for servlets
SERVLET_DIR
protected String SERVLET_DIR
- Directory name
localServletsDir
protected String localServletsDir
ServletInfo
public ServletInfo(Service service) throws IOException
- Creates new ServletInfo
- Parameters:
- service - service
logError
protected abstract void logError(Exception e)
- Logs the exception
logEvent
protected abstract void logEvent(int logLevel,
String s)
- Logs the event
updateProperties
public void updateProperties(ExProperties props)
- Called when properties are updated from the admin UI.
- Parameters:
- props - properties
getServletProperties
public Properties getServletProperties()
- Gets the servletProperties
- Returns:
- servlet properties
getLoadedServlets
public Enumeration getLoadedServlets()
- Gets the servletHashtable
- Returns:
- servlet hashtable
loadStartupServlets
public void loadStartupServlets()
- Loads the servlets specified by "servlets.startup" in
servlets.properties.
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
removeServletStartup
public void removeServletStartup(String servletName)
- Remove servletName from the list of servlets to be started at startup
isAutoloaded
public boolean isAutoloaded(String servletName)
- Check if servletName is in the list of servlets to be started at startup
getServlet
public Servlet getServlet(String name)
- Returns the servlet corresponding to the specified name,
or null if it is not loaded
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
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
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
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
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
removeServlet
public void removeServlet(String name)
- Remove the named servlet, if it exists.
- Parameters:
- name - servlet's name
destroyLoadedServlets
public synchronized void destroyLoadedServlets()
- Destroy all loaded servlets.
save
protected synchronized void save()
- Saves the properties
getServletConfig
protected ServletConfig getServletConfig(Properties argsProps)
All Packages Class Hierarchy This Package Previous Next Index