|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectelectric.servlet.Config
Config is an implementation of the standard ServletConfig interface.
Field Summary |
Fields inherited from interface electric.util.log.ILoggingConstants |
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT |
Constructor Summary | |
Config(java.lang.String name)
Construct a Config with the specified servletName and servlet class. |
|
Config(java.lang.String name,
javax.servlet.Servlet servlet)
Construct a Config with the specified servletName and servlet. |
|
Config(java.lang.String name,
java.lang.String className)
Construct a Config with the specified servletName and servlet class. |
Method Summary | |
void |
addInitParameter(java.lang.String key,
java.lang.String value)
Add an init parameter with the specified key and value, overriding any previous setting. |
HTTPContext |
getContext()
Return the context. |
java.lang.String |
getInitParameter(java.lang.String name)
Return the init parameter with the specified servletName, or null if there is none. |
java.util.Enumeration |
getInitParameterNames()
Return an enumeration over the init parameter names. |
java.util.Hashtable |
getInitParameters()
Return a hashtable of the init parameters. |
java.lang.String |
getJspFile()
Return the servletName of the servlet class. |
int |
getLoadOnStartup()
Return the startup order, or -1 if there is none. |
javax.servlet.Servlet |
getServlet()
Return the servlet, constructing one if necessary. |
java.lang.String |
getServletClass()
Return the servletName of the servlet class. |
javax.servlet.ServletContext |
getServletContext()
Return the servlet context. |
java.lang.String |
getServletName()
Return the servlet servletName. |
boolean |
isUnvailable()
if a servlet throws a servletexception on initialization, it is considered unavailable. |
void |
removeInitParameter(java.lang.String key)
Remove the init parameter with the specified key. |
void |
service(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Service the servlet request. |
void |
setContext(HTTPContext context)
Set the context. |
void |
setJspFile(java.lang.String jspFile)
Set the member corresponding to the <jsp-file> element in a <servlet> declaration in web.xml. |
void |
setLoadOnStartup(int startupOrder)
Set the startup order. |
void |
setServletClass(java.lang.String servletClass)
Set the member corresponding to the <servlet-class> element in a <servlet> declaration in web.xml. |
void |
shutdown()
Shut down, sending the servlet destroy(). |
void |
startup()
Start up, constructing a servlet if autoload is true. |
java.lang.String |
toString()
Return a description. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Config(java.lang.String name)
name
- The servletName.public Config(java.lang.String name, java.lang.String className)
name
- The servletName.className
- The servletName of the servlet class to instantiate.public Config(java.lang.String name, javax.servlet.Servlet servlet)
name
- The servletName.servlet
- The servlet.Method Detail |
public java.lang.String toString()
public int getLoadOnStartup()
public void setLoadOnStartup(int startupOrder)
startupOrder
- The relative order that this servlet should be started.public void setServletClass(java.lang.String servletClass)
servletClass
- public java.lang.String getServletClass()
public void setJspFile(java.lang.String jspFile)
jspFile
- public java.lang.String getJspFile()
public HTTPContext getContext()
public void setContext(HTTPContext context)
context
- The new context.public java.util.Hashtable getInitParameters()
public java.lang.String getInitParameter(java.lang.String name)
getInitParameter
in interface javax.servlet.ServletConfig
name
- public java.util.Enumeration getInitParameterNames()
getInitParameterNames
in interface javax.servlet.ServletConfig
public void addInitParameter(java.lang.String key, java.lang.String value)
key
- The key.value
- The value.public void removeInitParameter(java.lang.String key)
key
- The key.public javax.servlet.ServletContext getServletContext()
getServletContext
in interface javax.servlet.ServletConfig
public java.lang.String getServletName()
getServletName
in interface javax.servlet.ServletConfig
public javax.servlet.Servlet getServlet() throws javax.servlet.ServletException
javax.servlet.ServletException
- If a servlet could not be obtained.public void service(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws javax.servlet.ServletException, java.io.IOException
request
- The request.response
- The response.
javax.servlet.ServletException
- If a servlet exception occurs.
java.io.IOException
- If an I/O exception occurs.public boolean isUnvailable()
public void startup() throws javax.servlet.ServletException
javax.servlet.ServletException
- If a servlet could not be obtained.public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |