public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope, Comparable
| Modifier and Type | Class and Description |
|---|---|
protected class |
ServletHolder.Config |
class |
ServletHolder.Registration |
Holder.HolderConfig, Holder.HolderRegistrationAbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener| Modifier and Type | Field and Description |
|---|---|
static Map<String,String> |
NO_MAPPED_ROLES |
_asyncSupported, _class, _className, _displayName, _extInstance, _initParams, _name, _servletHandler_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING| Constructor and Description |
|---|
ServletHolder()
Constructor .
|
ServletHolder(Class<? extends Servlet> servlet)
Constructor for servlet class.
|
ServletHolder(Servlet servlet)
Constructor for existing servlet.
|
ServletHolder(String name,
Class<? extends Servlet> servlet)
Constructor for servlet class.
|
ServletHolder(String name,
Servlet servlet)
Constructor for existing servlet.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
protected void |
initJspServlet() |
boolean |
isAvailable() |
boolean |
isSetInitOrder() |
protected Servlet |
newInstance() |
protected void |
postInitJspServlet() |
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.
|
dump, dump, getClassName, getDisplayName, getHeldClass, getInitParameter, getInitParameterNames, getInitParameters, getName, getServletHandler, illegalStateIfContextStarted, isAsyncSupported, isInstance, setAsyncSupported, setClassName, setDisplayName, setHeldClass, setInitParameter, setInitParameters, setName, setServletHandler, toStringaddLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetNamepublic ServletHolder()
public ServletHolder(Servlet servlet)
public ServletHolder(String name, Class<? extends Servlet> servlet)
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 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 rolepublic String getForcedPath()
public void setForcedPath(String forcedPath)
forcedPath - The forcedPath to set.public void doStart()
throws Exception
public void doStop()
throws Exception
public void destroyInstance(Object o) throws Exception
destroyInstance in class Holder<Servlet>Exceptionpublic 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
public ServletRegistration.Dynamic getRegistration()
protected Servlet newInstance() throws ServletException, IllegalAccessException, InstantiationException
ServletExceptionIllegalAccessExceptionInstantiationExceptionCopyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.