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.
-
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
-
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
-
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
XXX: We should have logs in the server level for these things.
-
logEvent(int, String)
- Logs the event
XXX: We should have logs in the server level for these things.
-
removeServlet(String)
- Remove the servlet.
-
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
XXX: We should have logs in the server level for these things.
logEvent
protected abstract void logEvent(int logLevel,
String s)
- Logs the event
XXX: We should have logs in the server level for these things.
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.
XXX: HttpService calls this method. should move up to Server level.
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
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
loadServlet
protected Servlet loadServlet(String servletName) throws Exception
- load one servlet given name
- Returns:
- the servlet
- Throws: Exception
- error
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
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.
removeServlet
public synchronized void removeServlet(String name) throws Exception
- Remove the servlet.
- Throws: Exception
- if servlet cannot be loaded
save
protected synchronized void save()
- Saves the properties
All Packages Class Hierarchy This Package Previous Next Index