|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AggregateLifeCycle
org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandlerContainer
org.eclipse.jetty.server.handler.HandlerWrapper
org.eclipse.jetty.server.handler.ScopedHandler
org.eclipse.jetty.server.handler.ContextHandler
org.eclipse.jetty.servlet.ServletContextHandler
public class ServletContextHandler
Servlet Context. This extension to the ContextHandler allows for simple construction of a context with ServletHandler and optionally session and security handlers, et.
new ServletContext("/context",Context.SESSIONS|Context.NO_SECURITY);
This class should have been called ServletContext, but this would have
cause confusion with ServletContext.
| 嵌套类摘要 | |
|---|---|
class |
ServletContextHandler.Context
|
static interface |
ServletContextHandler.Decorator
Interface to decorate loaded classes. |
static class |
ServletContextHandler.JspConfig
|
static class |
ServletContextHandler.JspPropertyGroup
|
static class |
ServletContextHandler.TagLib
|
| 从类 org.eclipse.jetty.server.handler.ContextHandler 继承的嵌套类/接口 |
|---|
ContextHandler.AliasCheck, ContextHandler.ApproveNonExistentDirectoryAliases, ContextHandler.ApprovePathPrefixAliases, ContextHandler.ApproveSameSuffixAliases |
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的嵌套类/接口 |
|---|
AbstractLifeCycle.AbstractLifeCycleListener |
| 从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口 |
|---|
LifeCycle.Listener |
| 字段摘要 | |
|---|---|
protected List<ServletContextHandler.Decorator> |
_decorators
|
protected Class<? extends SecurityHandler> |
_defaultSecurityHandlerClass
|
protected JspConfigDescriptor |
_jspConfig
|
protected int |
_options
|
protected Object |
_restrictedContextListeners
|
protected SecurityHandler |
_securityHandler
|
protected ServletHandler |
_servletHandler
|
protected SessionHandler |
_sessionHandler
|
protected HandlerWrapper |
_wrapper
|
static int |
NO_SECURITY
|
static int |
NO_SESSIONS
|
static int |
SECURITY
|
static int |
SESSIONS
|
| 从类 org.eclipse.jetty.server.handler.ContextHandler 继承的字段 |
|---|
_scontext, MANAGED_ATTRIBUTES |
| 从类 org.eclipse.jetty.server.handler.ScopedHandler 继承的字段 |
|---|
_nextScope, _outerScope |
| 从类 org.eclipse.jetty.server.handler.HandlerWrapper 继承的字段 |
|---|
_handler |
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的字段 |
|---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
| 构造方法摘要 | |
|---|---|
ServletContextHandler()
|
|
ServletContextHandler(HandlerContainer parent,
SessionHandler sessionHandler,
SecurityHandler securityHandler,
ServletHandler servletHandler,
ErrorHandler errorHandler)
|
|
ServletContextHandler(HandlerContainer parent,
String contextPath)
|
|
ServletContextHandler(HandlerContainer parent,
String contextPath,
boolean sessions,
boolean security)
|
|
ServletContextHandler(HandlerContainer parent,
String contextPath,
int options)
|
|
ServletContextHandler(HandlerContainer parent,
String contextPath,
SessionHandler sessionHandler,
SecurityHandler securityHandler,
ServletHandler servletHandler,
ErrorHandler errorHandler)
|
|
ServletContextHandler(int options)
|
|
| 方法摘要 | |
|---|---|
void |
addDecorator(ServletContextHandler.Decorator decorator)
|
FilterHolder |
addFilter(Class<? extends Filter> filterClass,
String pathSpec,
EnumSet<DispatcherType> dispatches)
convenience method to add a filter |
void |
addFilter(FilterHolder holder,
String pathSpec,
EnumSet<DispatcherType> dispatches)
conveniance method to add a filter |
FilterHolder |
addFilter(String filterClass,
String pathSpec,
EnumSet<DispatcherType> dispatches)
convenience method to add a filter |
protected void |
addRoles(String... roleNames)
delegate for ServletContext.declareRole method |
ServletHolder |
addServlet(Class<? extends Servlet> servlet,
String pathSpec)
conveniance method to add a servlet. |
void |
addServlet(ServletHolder servlet,
String pathSpec)
conveniance method to add a servlet. |
ServletHolder |
addServlet(String className,
String pathSpec)
conveniance method to add a servlet. |
void |
callContextDestroyed(ServletContextListener l,
ServletContextEvent e)
|
void |
callContextInitialized(ServletContextListener l,
ServletContextEvent e)
|
protected void |
doStop()
Stop the joined lifecycle beans in the reverse order they were added. |
protected ServletRegistration.Dynamic |
dynamicHolderAdded(ServletHolder holder)
notification that a ServletRegistration has been created so we can track the annotations |
List<ServletContextHandler.Decorator> |
getDecorators()
|
Class<? extends SecurityHandler> |
getDefaultSecurityHandlerClass()
Get the defaultSecurityHandlerClass. |
SecurityHandler |
getSecurityHandler()
|
ServletHandler |
getServletHandler()
|
SessionHandler |
getSessionHandler()
|
boolean |
isRestrictListeners()
|
protected SecurityHandler |
newSecurityHandler()
|
protected ServletHandler |
newServletHandler()
|
protected SessionHandler |
newSessionHandler()
|
void |
restrictEventListener(EventListener e)
Apply any necessary restrictions on a programmatically added listener. |
void |
setDecorators(List<ServletContextHandler.Decorator> decorators)
|
void |
setDefaultSecurityHandlerClass(Class<? extends SecurityHandler> defaultSecurityHandlerClass)
Set the defaultSecurityHandlerClass. |
void |
setRestrictListeners(boolean restrictListeners)
|
void |
setSecurityHandler(SecurityHandler securityHandler)
|
void |
setServletHandler(ServletHandler servletHandler)
|
Set<String> |
setServletSecurity(ServletRegistration.Dynamic registration,
ServletSecurityElement servletSecurityElement)
Delegate for ServletRegistration.Dynamic.setServletSecurity method |
void |
setSessionHandler(SessionHandler sessionHandler)
|
protected void |
startContext()
Finish constructing handlers and link them together. |
| 从类 org.eclipse.jetty.server.handler.ScopedHandler 继承的方法 |
|---|
handle, never, nextHandle, nextScope |
| 从类 org.eclipse.jetty.server.handler.HandlerWrapper 继承的方法 |
|---|
destroy, expandChildren, getHandler, getHandlers, getNestedHandlerByClass, setHandler |
| 从类 org.eclipse.jetty.server.handler.AbstractHandlerContainer 继承的方法 |
|---|
expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass |
| 从类 org.eclipse.jetty.server.handler.AbstractHandler 继承的方法 |
|---|
dumpThis, getServer |
| 从类 org.eclipse.jetty.util.component.AggregateLifeCycle 继承的方法 |
|---|
addBean, addBean, contains, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage |
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的方法 |
|---|
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 从接口 org.eclipse.jetty.server.Handler 继承的方法 |
|---|
destroy, getServer, handle |
| 从接口 org.eclipse.jetty.util.component.LifeCycle 继承的方法 |
|---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| 字段详细信息 |
|---|
public static final int SESSIONS
public static final int SECURITY
public static final int NO_SESSIONS
public static final int NO_SECURITY
protected final List<ServletContextHandler.Decorator> _decorators
protected Class<? extends SecurityHandler> _defaultSecurityHandlerClass
protected SessionHandler _sessionHandler
protected SecurityHandler _securityHandler
protected ServletHandler _servletHandler
protected HandlerWrapper _wrapper
protected int _options
protected JspConfigDescriptor _jspConfig
protected Object _restrictedContextListeners
| 构造方法详细信息 |
|---|
public ServletContextHandler()
public ServletContextHandler(int options)
public ServletContextHandler(HandlerContainer parent,
String contextPath)
public ServletContextHandler(HandlerContainer parent,
String contextPath,
int options)
public ServletContextHandler(HandlerContainer parent,
String contextPath,
boolean sessions,
boolean security)
public ServletContextHandler(HandlerContainer parent,
SessionHandler sessionHandler,
SecurityHandler securityHandler,
ServletHandler servletHandler,
ErrorHandler errorHandler)
public ServletContextHandler(HandlerContainer parent,
String contextPath,
SessionHandler sessionHandler,
SecurityHandler securityHandler,
ServletHandler servletHandler,
ErrorHandler errorHandler)
| 方法详细信息 |
|---|
protected void doStop()
throws Exception
AggregateLifeCycle 复制的描述
ContextHandler 中的 doStopExceptionContextHandler.doStop()public Class<? extends SecurityHandler> getDefaultSecurityHandlerClass()
public void setDefaultSecurityHandlerClass(Class<? extends SecurityHandler> defaultSecurityHandlerClass)
defaultSecurityHandlerClass - the defaultSecurityHandlerClass to setprotected SessionHandler newSessionHandler()
protected SecurityHandler newSecurityHandler()
protected ServletHandler newServletHandler()
protected void startContext()
throws Exception
ContextHandler 中的 startContextExceptionContextHandler.startContext()public SecurityHandler getSecurityHandler()
public ServletHandler getServletHandler()
public SessionHandler getSessionHandler()
public ServletHolder addServlet(String className,
String pathSpec)
public ServletHolder addServlet(Class<? extends Servlet> servlet,
String pathSpec)
public void addServlet(ServletHolder servlet,
String pathSpec)
public void addFilter(FilterHolder holder,
String pathSpec,
EnumSet<DispatcherType> dispatches)
public FilterHolder addFilter(Class<? extends Filter> filterClass,
String pathSpec,
EnumSet<DispatcherType> dispatches)
public FilterHolder addFilter(String filterClass,
String pathSpec,
EnumSet<DispatcherType> dispatches)
protected ServletRegistration.Dynamic dynamicHolderAdded(ServletHolder holder)
holder - new holder created through the api.
protected void addRoles(String... roleNames)
roleNames - role names to add
public Set<String> setServletSecurity(ServletRegistration.Dynamic registration,
ServletSecurityElement servletSecurityElement)
registration - ServletRegistration.Dynamic instance that setServletSecurity was called onservletSecurityElement - new security info
public void restrictEventListener(EventListener e)
ContextHandler 复制的描述
ContextHandler 中的 restrictEventListenerpublic boolean isRestrictListeners()
public void setRestrictListeners(boolean restrictListeners)
public void callContextInitialized(ServletContextListener l,
ServletContextEvent e)
ContextHandler 中的 callContextInitialized
public void callContextDestroyed(ServletContextListener l,
ServletContextEvent e)
ContextHandler 中的 callContextDestroyedpublic void setSessionHandler(SessionHandler sessionHandler)
sessionHandler - The sessionHandler to set.public void setSecurityHandler(SecurityHandler securityHandler)
securityHandler - The SecurityHandler to set on this context.public void setServletHandler(ServletHandler servletHandler)
servletHandler - The servletHandler to set.public List<ServletContextHandler.Decorator> getDecorators()
public void setDecorators(List<ServletContextHandler.Decorator> decorators)
decorators - The lis of ServletContextHandler.Decoratorspublic void addDecorator(ServletContextHandler.Decorator decorator)
decorator - The decorator to add
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||