|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.servlet.Holder<Servlet>
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
|
class |
ServletHolder.Registration
|
Nested classes/interfaces inherited from class org.eclipse.jetty.servlet.Holder |
---|
Holder.HolderConfig, Holder.HolderRegistration |
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
AbstractLifeCycle.AbstractLifeCycleListener |
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
LifeCycle.Listener |
Field Summary | |
---|---|
static java.util.Map<java.lang.String,java.lang.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(java.lang.Class<? extends Servlet> 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(java.lang.Object o)
Comparitor by init order. |
void |
destroyInstance(java.lang.Object o)
|
void |
doStart()
|
void |
doStop()
|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getContextPath()
|
java.lang.String |
getForcedPath()
|
int |
getInitOrder()
|
ServletRegistration.Dynamic |
getRegistration()
|
java.util.Map<java.lang.String,java.lang.String> |
getRoleMap()
|
java.util.Map<java.lang.String,java.lang.String> |
getRoleRefMap()
|
java.lang.String |
getRunAsRole()
|
Servlet |
getServlet()
Get the servlet. |
Servlet |
getServletInstance()
Get the servlet instance (no initialization done). |
UnavailableException |
getUnavailableException()
|
java.lang.String |
getUserRoleLink(java.lang.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()
|
boolean |
isSetInitOrder()
|
protected Servlet |
newInstance()
|
void |
setForcedPath(java.lang.String forcedPath)
|
void |
setInitOrder(int order)
Set the initialize order. |
void |
setRunAsRole(java.lang.String role)
|
void |
setServlet(Servlet servlet)
|
void |
setUserRoleLink(java.lang.String name,
java.lang.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, isInstance, 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 java.util.Map<java.lang.String,java.lang.String> NO_MAPPED_ROLES
Constructor Detail |
---|
public ServletHolder()
public ServletHolder(Servlet servlet)
public ServletHolder(java.lang.Class<? extends Servlet> servlet)
Method Detail |
---|
public UnavailableException getUnavailableException()
public void setServlet(Servlet servlet)
public int getInitOrder()
public void setInitOrder(int order)
public boolean isSetInitOrder()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void setUserRoleLink(java.lang.String name, java.lang.String link)
name
- The role name as used by the servletlink
- The role name as used by the container.public java.lang.String getUserRoleLink(java.lang.String name)
name
- The name of the role
public java.util.Map<java.lang.String,java.lang.String> getRoleMap()
public java.lang.String getForcedPath()
public void setForcedPath(java.lang.String forcedPath)
forcedPath
- The forcedPath to set.public void doStart() throws java.lang.Exception
doStart
in class Holder<Servlet>
java.lang.Exception
public void doStop() throws java.lang.Exception
doStop
in class Holder<Servlet>
java.lang.Exception
public void destroyInstance(java.lang.Object o) throws java.lang.Exception
destroyInstance
in class Holder<Servlet>
java.lang.Exception
public Servlet getServlet() throws ServletException
ServletException
public Servlet getServletInstance()
public void checkServletType() throws UnavailableException
UnavailableException
public boolean isAvailable()
public java.lang.String getContextPath()
getContextPath
in interface UserIdentity.Scope
UserIdentity.Scope.getContextPath()
public java.util.Map<java.lang.String,java.lang.String> getRoleRefMap()
getRoleRefMap
in interface UserIdentity.Scope
UserIdentity.Scope.getRoleRefMap()
public java.lang.String getRunAsRole()
public void setRunAsRole(java.lang.String role)
public void handle(Request baseRequest, ServletRequest request, ServletResponse response) throws ServletException, UnavailableException, java.io.IOException
ServletException
UnavailableException
java.io.IOException
public ServletRegistration.Dynamic getRegistration()
protected Servlet newInstance() throws ServletException, java.lang.IllegalAccessException, java.lang.InstantiationException
ServletException
java.lang.IllegalAccessException
java.lang.InstantiationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |