|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.mortbay.HTTP.Handler.ServletHolder
Servlet Holder Holds the name, params and some state of a javax.servlet.GenericServlet instance. It implements the ServletConfig interface. This class will organise the loading of the servlet when needed or requested.
ServletHandler| Constructor Summary | |
ServletHolder(java.lang.String name,
javax.servlet.GenericServlet sl)
Construct a Servlet Holder from an already instantiated and initialized servlet. |
|
ServletHolder(java.lang.String name,
java.lang.String className)
Construct a Servlet property mostly from the servers config file. |
|
ServletHolder(java.lang.String name,
java.lang.String className,
java.util.Hashtable initParams)
Construct a Servlet property mostly from the servers config file. |
|
ServletHolder(java.lang.String name,
java.lang.String className,
java.util.Hashtable initParams,
boolean initialize)
Construct a Servlet property mostly from the servers config file. |
|
ServletHolder(java.lang.String servletLoaderName,
java.lang.String name,
java.lang.String className,
java.lang.String classPath,
java.util.Hashtable initParams)
Construct a Servlet property mostly from the servers config file. |
|
| Method Summary | |
void |
destroy()
Destroy. |
int |
getActiveRequests()
|
boolean |
getChunkByDefault()
Set chunkByDefault |
java.lang.String |
getInitParameter(java.lang.String param)
Gets an initialization parameter of the servlet. |
java.util.Enumeration |
getInitParameterNames()
Returns an enumeration of strings representing the initialization parameters for this servlet. |
int |
getNumRequests()
|
javax.servlet.GenericServlet |
getServlet()
Get the servlet. |
javax.servlet.ServletContext |
getServletContext()
Return server as the ServletContext. |
void |
reload()
Reload the servlet. |
void |
service(HttpRequest request,
HttpResponse response)
Service a request with this servlet. |
void |
setAutoReload(boolean autoReload)
Set autoReload. |
void |
setChunkByDefault(boolean chunk)
Set chunkByDefault |
void |
setInitialize(boolean initialize)
Set Initialize flag. |
void |
setServer(HttpServer server)
Set server. |
java.lang.String |
toString()
Get the name of the Servlet |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public ServletHolder(java.lang.String name,
java.lang.String className)
throws java.lang.ClassNotFoundException
public ServletHolder(java.lang.String name,
java.lang.String className,
java.util.Hashtable initParams)
throws java.lang.ClassNotFoundException
name - Servlet nameclassName - Servlet class name (fully qualified)initParams - Hashtable of parameters
public ServletHolder(java.lang.String servletLoaderName,
java.lang.String name,
java.lang.String className,
java.lang.String classPath,
java.util.Hashtable initParams)
throws java.lang.ClassNotFoundException
servletLoaderName - ServletLoader class name (or null)name - Servlet nameclassName - Servlet class name (fully qualified)classPath - Servlet class path of directories and jarsinitParams - Hashtable of parameters
public ServletHolder(java.lang.String name,
java.lang.String className,
java.util.Hashtable initParams,
boolean initialize)
throws java.lang.ClassNotFoundException
name - Servlet nameclassName - Servlet class name (fully qualified)initParams - Hashtable of parametersinitialize - Set Initialize
public ServletHolder(java.lang.String name,
javax.servlet.GenericServlet sl)
name - Servlet namesl - The servlet object| Method Detail |
public void reload()
public void setInitialize(boolean initialize)
initialize - Initialize at load time if true.
public void setServer(HttpServer server)
throws javax.servlet.ServletException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
public void destroy()
public javax.servlet.GenericServlet getServlet()
throws javax.servlet.UnavailableException
public void setChunkByDefault(boolean chunk)
chunk - If True, servlets without content lengths that
have not explicitly requested a closing connection, will use
HTTP/1.1 chunking if possible.public void setAutoReload(boolean autoReload)
autoReload - If true, an expensive check is made on each
servlet requests to see if the servlet has been modified and
should be reloaded.public boolean getChunkByDefault()
chunk - If True, servlets without content lengths that
have not explicitly requested a closing connection, will use
HTTP/1.1 chunking if possible.public javax.servlet.ServletContext getServletContext()
ServletContext object, which
gives the servlet information about how
to interact with the serverServletContextpublic java.lang.String getInitParameter(java.lang.String param)
name - the parameter namepublic java.util.Enumeration getInitParameterNames()
Enumeration of String
objects containing the names of the servlet's
initialization parameters
public void service(HttpRequest request,
HttpResponse response)
throws javax.servlet.ServletException,
javax.servlet.UnavailableException,
java.io.IOException
request - The requestresponse - The responsepublic int getNumRequests()
public int getActiveRequests()
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||