|
||||||||||
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.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
consciouscode.seedling.jetty.SeedlingServletContextHandler
public class SeedlingServletContextHandler
Extends Jetty's servlet ContextHandler to automatically build path mappings from entries in the Seedling container.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jetty.servlet.ServletContextHandler |
---|
org.eclipse.jetty.servlet.ServletContextHandler.Context, org.eclipse.jetty.servlet.ServletContextHandler.Decorator |
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener |
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
org.eclipse.jetty.util.component.LifeCycle.Listener |
Field Summary |
---|
Fields inherited from class org.eclipse.jetty.servlet.ServletContextHandler |
---|
_decorators, _defaultSecurityHandlerClass, _options, _restrictedContextListeners, _securityHandler, _servletHandler, _sessionHandler, NO_SECURITY, NO_SESSIONS, SECURITY, SESSIONS |
Fields inherited from class org.eclipse.jetty.server.handler.ContextHandler |
---|
_scontext, MANAGED_ATTRIBUTES |
Fields inherited from class org.eclipse.jetty.server.handler.ScopedHandler |
---|
_nextScope, _outerScope |
Fields inherited from class org.eclipse.jetty.server.handler.HandlerWrapper |
---|
_handler |
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
Constructor Summary | |
---|---|
SeedlingServletContextHandler()
|
|
SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent,
org.eclipse.jetty.server.session.SessionHandler sessionHandler,
org.eclipse.jetty.security.SecurityHandler securityHandler,
org.eclipse.jetty.servlet.ServletHandler servletHandler,
org.eclipse.jetty.server.handler.ErrorHandler errorHandler)
|
|
SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent,
String contextPath)
|
|
SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent,
String contextPath,
boolean sessions,
boolean security)
|
|
SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent,
String contextPath,
int options)
|
|
SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent,
String contextPath,
org.eclipse.jetty.server.session.SessionHandler sessionHandler,
org.eclipse.jetty.security.SecurityHandler securityHandler,
org.eclipse.jetty.servlet.ServletHandler servletHandler,
org.eclipse.jetty.server.handler.ErrorHandler errorHandler)
|
|
SeedlingServletContextHandler(int options)
|
Method Summary | |
---|---|
BranchNode |
getPathBranch()
|
javax.servlet.Servlet |
getRootServlet()
Gets the servlet that will handle "/*" paths. |
org.eclipse.jetty.servlet.ServletHolder |
getRootServletHolder()
Gets the servlet holder that will handle "/*" paths. |
void |
setPathBranch(BranchNode branch)
|
void |
setRootServlet(javax.servlet.Servlet servlet)
Sets the servlet that will handle "/*" paths. |
void |
setRootServletHolder(org.eclipse.jetty.servlet.ServletHolder servlet)
Sets the servlet holder that will handle "/*" paths. |
void |
startService()
Starts a Seedling service. |
void |
stopService()
Stops a Seedling service. |
Methods inherited from class org.eclipse.jetty.servlet.ServletContextHandler |
---|
addDecorator, addFilter, addFilter, addFilter, addFilter, addFilter, addFilter, addServlet, addServlet, addServlet, callContextDestroyed, callContextInitialized, doStop, getDecorators, getDefaultSecurityHandlerClass, getSecurityHandler, getServletHandler, getSessionHandler, newSecurityHandler, newServletHandler, newSessionHandler, setDecorators, setDefaultSecurityHandlerClass, setSecurityHandler, setServletHandler, setSessionHandler, startContext |
Methods inherited from class org.eclipse.jetty.server.handler.ContextHandler |
---|
addEventListener, addLocaleEncoding, checkContext, checkManagedAttribute, clearAttributes, doHandle, doScope, doStart, dump, getAllowNullPathInfo, getAttribute, getAttributeNames, getAttributes, getBaseResource, getClassLoader, getClassPath, getConnectorNames, getContextPath, getCurrentContext, getDisplayName, getErrorHandler, getEventListeners, getInitParameter, getInitParameterNames, getInitParams, getLocaleEncoding, getLocaleEncoding, getLogger, getMaxFormContentSize, getMimeTypes, getResource, getResourceBase, getResourcePaths, getServletContext, getVirtualHosts, getWelcomeFiles, handle, isAliases, isAvailable, isCompactPath, isProtectedTarget, isShutdown, loadClass, newResource, newResource, removeAttribute, setAliases, setAllowNullPathInfo, setAttribute, setAttributes, setAvailable, setBaseResource, setClassLoader, setCompactPath, setConnectorNames, setContextPath, setDisplayName, setErrorHandler, setEventListeners, setInitParameter, setLogger, setManagedAttribute, setMaxFormContentSize, setMimeTypes, setResourceBase, setServer, setShutdown, setVirtualHosts, setWelcomeFiles, toString |
Methods inherited from class org.eclipse.jetty.server.handler.ScopedHandler |
---|
handle, never, nextHandle, nextScope |
Methods inherited from class org.eclipse.jetty.server.handler.HandlerWrapper |
---|
destroy, expandChildren, getHandler, getHandlers, getNestedHandlerByClass, setHandler |
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandlerContainer |
---|
expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass |
Methods inherited from class org.eclipse.jetty.server.handler.AbstractHandler |
---|
dumpThis, getServer |
Methods inherited from class org.eclipse.jetty.util.component.AggregateLifeCycle |
---|
addBean, dump, dump, dump, dump, dumpStdErr, getBean, getBeans, getBeans, removeBean, removeBeans |
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jetty.server.Handler |
---|
destroy, getServer, handle |
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Constructor Detail |
---|
public SeedlingServletContextHandler()
public SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent, org.eclipse.jetty.server.session.SessionHandler sessionHandler, org.eclipse.jetty.security.SecurityHandler securityHandler, org.eclipse.jetty.servlet.ServletHandler servletHandler, org.eclipse.jetty.server.handler.ErrorHandler errorHandler)
public SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent, String contextPath, boolean sessions, boolean security)
public SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent, String contextPath, int options)
public SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent, String contextPath, org.eclipse.jetty.server.session.SessionHandler sessionHandler, org.eclipse.jetty.security.SecurityHandler securityHandler, org.eclipse.jetty.servlet.ServletHandler servletHandler, org.eclipse.jetty.server.handler.ErrorHandler errorHandler)
public SeedlingServletContextHandler(org.eclipse.jetty.server.HandlerContainer parent, String contextPath)
public SeedlingServletContextHandler(int options)
Method Detail |
---|
public org.eclipse.jetty.servlet.ServletHolder getRootServletHolder()
"/*"
paths.
public void setRootServletHolder(org.eclipse.jetty.servlet.ServletHolder servlet)
"/*"
paths.
servlet
- may be null to disable root paths.public javax.servlet.Servlet getRootServlet()
"/*"
paths.
If getRootServletHolder()
returns a holder, its servlet will
be replaced with this one when the context starts.
public void setRootServlet(javax.servlet.Servlet servlet)
"/*"
paths.
If getRootServletHolder()
returns a holder, its servlet will
be replaced with this one when the context starts.
servlet
- may be null.public BranchNode getPathBranch()
public void setPathBranch(BranchNode branch)
public void startService() throws Exception
ServiceNode
RuntimeException
are propagated
to the application, but any other kind of exception is wrapped in a
ServiceException
and rethrown.
startService
in interface ServiceNode
Exception
public void stopService()
ServiceNode
Implementations of this method must not do anything that may change
the state of the parent Seedling. In particular, it cannot call
any overload of the following methods:
BranchNode.getNode(java.lang.String)
,
BranchNode.getChild(java.lang.String)
, GrowingBranch.installChild(java.lang.String, java.lang.Object)
,
GrowingBranch.uninstallChild(java.lang.String)
.
Furthermore, this method may be called from within a JVM shutdown hook, which implies that it must work promptly and carefully.
stopService
in interface ServiceNode
Runtime.addShutdownHook(java.lang.Thread)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |