|
||||||||||
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<javax.servlet.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 javax.servlet.Servlet> servlet)
Constructor for existing servlet. |
|
ServletHolder(javax.servlet.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()
|
javax.servlet.Servlet |
getServlet()
Get the servlet. |
javax.servlet.Servlet |
getServletInstance()
Get the servlet instance (no initialization done). |
javax.servlet.UnavailableException |
getUnavailableException()
|
java.lang.String |
getUserRoleLink(java.lang.String name)
get a user role link. |
void |
handle(Request baseRequest,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Service a request with this servlet. |
int |
hashCode()
|
boolean |
isAvailable()
|
boolean |
isSetInitOrder()
|
protected javax.servlet.Servlet |
newInstance()
|
void |
setForcedPath(java.lang.String forcedPath)
|
void |
setInitOrder(int order)
Set the initialize order. |
void |
setRunAsRole(java.lang.String role)
|
void |
setServlet(javax.servlet.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(javax.servlet.Servlet servlet)
public ServletHolder(java.lang.Class<? extends javax.servlet.Servlet> servlet)
Method Detail |
---|
public javax.servlet.UnavailableException getUnavailableException()
public void setServlet(javax.servlet.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<javax.servlet.Servlet>
java.lang.Exception
public void doStop() throws java.lang.Exception
doStop
in class Holder<javax.servlet.Servlet>
java.lang.Exception
public void destroyInstance(java.lang.Object o) throws java.lang.Exception
destroyInstance
in class Holder<javax.servlet.Servlet>
java.lang.Exception
public javax.servlet.Servlet getServlet() throws javax.servlet.ServletException
javax.servlet.ServletException
public javax.servlet.Servlet getServletInstance()
public void checkServletType() throws javax.servlet.UnavailableException
javax.servlet.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, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws javax.servlet.ServletException, javax.servlet.UnavailableException, java.io.IOException
javax.servlet.ServletException
javax.servlet.UnavailableException
java.io.IOException
public ServletRegistration.Dynamic getRegistration()
protected javax.servlet.Servlet newInstance() throws javax.servlet.ServletException, java.lang.IllegalAccessException, java.lang.InstantiationException
javax.servlet.ServletException
java.lang.IllegalAccessException
java.lang.InstantiationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |