|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.component.AbstractLifeCycle org.mortbay.jetty.servlet.Holder org.mortbay.jetty.servlet.ServletHolder
public class ServletHolder
Servlet Instance and Context Holder. Holds the name, params and some state of a javax.servlet.Servlet instance. It implements the ServletConfig interface. This class will organise the loading of the servlet when needed or requested.
Field Summary |
---|
Fields inherited from class org.mortbay.jetty.servlet.Holder |
---|
_class, _className, _displayName, _extInstance, _initParams, _name, _servletHandler |
Constructor Summary | |
---|---|
ServletHolder()
Constructor . |
|
ServletHolder(Class servlet)
Constructor for existing servlet. |
|
ServletHolder(Servlet servlet)
Constructor for existing servlet. |
Method Summary | |
---|---|
void |
checkServletType()
Check to ensure class of servlet is acceptable. |
int |
compareTo(Object o)
Comparitor by init order. |
void |
destroyInstance(Object o)
|
void |
doStart()
|
void |
doStop()
|
boolean |
equals(Object o)
|
String |
getForcedPath()
|
int |
getInitOrder()
|
Map |
getRoleMap()
|
String |
getRunAs()
|
Servlet |
getServlet()
Get the servlet. |
String |
getUserRoleLink(String name)
get a user role link. |
void |
handle(ServletRequest request,
ServletResponse response)
Service a request with this servlet. |
int |
hashCode()
|
boolean |
isAvailable()
|
void |
setForcedPath(String forcedPath)
|
void |
setInitOrder(int order)
Set the initialize order. |
void |
setRunAs(String role)
|
void |
setServlet(Servlet servlet)
|
void |
setUserRoleLink(String name,
String link)
Link a user role. |
Methods inherited from class org.mortbay.jetty.servlet.Holder |
---|
getClassName, getDisplayName, getHeldClass, getInitParameter, getInitParameterNames, getInitParameters, getName, getServletHandler, newInstance, setClassName, setDisplayName, setHeldClass, setInitParameter, setInitParameters, setName, setServletHandler, toString |
Methods inherited from class org.mortbay.component.AbstractLifeCycle |
---|
isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServletHolder()
public ServletHolder(Servlet servlet)
public ServletHolder(Class servlet)
Method Detail |
---|
public void setServlet(Servlet servlet)
public int getInitOrder()
public void setInitOrder(int order)
public int compareTo(Object o)
compareTo
in interface Comparable
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void setUserRoleLink(String name, String link)
name
- The role name as used by the servletlink
- The role name as used by the container.public String getUserRoleLink(String name)
name
- The name of the role
public Map getRoleMap()
public void setRunAs(String role)
role
- Role name that is added to UserPrincipal when this servlet
is called.public String getRunAs()
public String getForcedPath()
public void setForcedPath(String forcedPath)
forcedPath
- The forcedPath to set.public void doStart() throws Exception
doStart
in class Holder
Exception
public void doStop()
doStop
in class Holder
public void destroyInstance(Object o) throws Exception
destroyInstance
in class Holder
Exception
public Servlet getServlet() throws ServletException
ServletException
public void checkServletType() throws UnavailableException
UnavailableException
public boolean isAvailable()
public void handle(ServletRequest request, ServletResponse response) throws ServletException, UnavailableException, IOException
ServletException
UnavailableException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |