|
||||||||||
| 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 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<? 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(Object o)
Comparitor by init order. |
void |
destroyInstance(Object o)
|
void |
doStart()
|
void |
doStop()
|
boolean |
equals(Object o)
|
String |
getContextPath()
|
String |
getForcedPath()
|
int |
getInitOrder()
|
ServletRegistration.Dynamic |
getRegistration()
|
Map<String,String> |
getRoleMap()
|
Map<String,String> |
getRoleRefMap()
|
String |
getRunAsRole()
|
Servlet |
getServlet()
Get the servlet. |
Servlet |
getServletInstance()
Get the servlet instance (no initialization done). |
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()
|
boolean |
isSetInitOrder()
|
protected Servlet |
newInstance()
|
void |
setForcedPath(String forcedPath)
|
void |
setInitOrder(int order)
Set the initialize order. |
void |
setRunAsRole(String role)
|
void |
setServlet(Servlet servlet)
|
void |
setUserRoleLink(String name,
String link)
Link a user role. |
| Methods inherited from class org.eclipse.jetty.servlet.Holder |
|---|
dump, dump, 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, 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<? 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(Object o)
compareTo in interface Comparablepublic boolean equals(Object o)
equals in class Objectpublic 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<Servlet>Exception
public void doStop()
throws Exception
doStop in class Holder<Servlet>Exception
public void destroyInstance(Object o)
throws Exception
destroyInstance in class Holder<Servlet>Exception
public Servlet getServlet()
throws ServletException
ServletExceptionpublic Servlet getServletInstance()
public void checkServletType()
throws UnavailableException
UnavailableExceptionpublic boolean isAvailable()
public String getContextPath()
getContextPath in interface UserIdentity.ScopeUserIdentity.Scope.getContextPath()public Map<String,String> getRoleRefMap()
getRoleRefMap in interface UserIdentity.ScopeUserIdentity.Scope.getRoleRefMap()public String getRunAsRole()
public void setRunAsRole(String role)
public void handle(Request baseRequest,
ServletRequest request,
ServletResponse response)
throws ServletException,
UnavailableException,
IOException
ServletException
UnavailableException
IOExceptionpublic ServletRegistration.Dynamic getRegistration()
protected Servlet newInstance()
throws ServletException,
IllegalAccessException,
InstantiationException
ServletException
IllegalAccessException
InstantiationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||