|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.util.component.AbstractLifeCycle org.eclipse.jetty.servlet.Holder org.eclipse.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.
Nested Class Summary | |
---|---|
protected class |
ServletHolder.Config
|
Nested classes/interfaces inherited from class org.eclipse.jetty.servlet.Holder |
---|
Holder.HolderConfig |
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
LifeCycle.Listener |
Field Summary | |
---|---|
static Map<String,String> |
NO_MAPPED_ROLES
|
Fields inherited from class org.eclipse.jetty.servlet.Holder |
---|
_asyncSupported, _class, _className, _displayName, _extInstance, _initParams, _name, _servletHandler |
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
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 |
getContextPath()
|
String |
getForcedPath()
|
int |
getInitOrder()
|
Map<String,String> |
getRoleMap()
|
Map<String,String> |
getRoleRefMap()
|
String |
getRunAsRole()
|
Servlet |
getServlet()
Get the servlet. |
UnavailableException |
getUnavailableException()
|
String |
getUserRoleLink(String name)
get a user role link. |
void |
handle(Request baseRequest,
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 |
setRunAsRole(String role)
Set the run-as role for this servlet |
void |
setServlet(Servlet servlet)
|
void |
setUserRoleLink(String name,
String link)
Link a user role. |
Methods inherited from class org.eclipse.jetty.servlet.Holder |
---|
getClassName, getDisplayName, getHeldClass, getInitParameter, getInitParameterNames, getInitParameters, getName, getServletHandler, illegalStateIfContextStarted, isAsyncSupported, newInstance, setAsyncSupported, setClassName, setDisplayName, setHeldClass, setInitParameter, setInitParameters, setName, setServletHandler, toString |
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
addLifeCycleListener, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jetty.server.UserIdentity.Scope |
---|
getName |
Field Detail |
---|
public static final Map<String,String> NO_MAPPED_ROLES
Constructor Detail |
---|
public ServletHolder()
public ServletHolder(Servlet servlet)
public ServletHolder(Class servlet)
Method Detail |
---|
public UnavailableException getUnavailableException()
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<String,String> getRoleMap()
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() throws Exception
doStop
in class Holder
Exception
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 String getContextPath()
getContextPath
in interface UserIdentity.Scope
UserIdentity.Scope.getContextPath()
public Map<String,String> getRoleRefMap()
getRoleRefMap
in interface UserIdentity.Scope
UserIdentity.Scope.getRoleRefMap()
public String getRunAsRole()
org.eclipse.jetty.server.UserIdentity.Scope#getRunAsRole()
public void setRunAsRole(String role)
role
- run-as role for this servletpublic void handle(Request baseRequest, 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 |