Class HttpSpiContextHandler
java.lang.Object
- All Implemented Interfaces:
Handler, HandlerContainer, Attributes, Container, Destroyable, Dumpable, Dumpable.DumpableContainer, Graceful, LifeCycle
Jetty handler that bridges requests to
HttpHandler.-
Nested Class Summary
Nested classes/interfaces inherited from class ContextHandler
ContextHandler.AliasCheck, ContextHandler.ApproveAliases, ContextHandler.ApproveNonExistentDirectoryAliases, ContextHandler.Availability, ContextHandler.Context, ContextHandler.ContextScopeListener, ContextHandler.ContextStatus, ContextHandler.StaticContextNested classes/interfaces inherited from class AbstractHandler
AbstractHandler.ErrorDispatchHandlerNested classes/interfaces inherited from class AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerNested classes/interfaces inherited from interface Attributes
Attributes.WrapperNested classes/interfaces inherited from interface Container
Container.InheritedListener, Container.ListenerNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainerNested classes/interfaces inherited from interface Graceful
Graceful.ShutdownNested classes/interfaces inherited from interface LifeCycle
LifeCycle.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.sun.net.httpserver.HttpContextprivate com.sun.net.httpserver.HttpHandlerstatic final LoggerFields inherited from class ContextHandler
_contextStatus, _scontext, DEFAULT_LISTENER_TYPE_INDEX, DEFAULT_MAX_FORM_CONTENT_SIZE, DEFAULT_MAX_FORM_KEYS, EXTENDED_LISTENER_TYPE_INDEX, MANAGED_ATTRIBUTES, MAX_FORM_CONTENT_SIZE_KEY, MAX_FORM_KEYS_KEY, SERVLET_LISTENER_TYPES, SERVLET_MAJOR_VERSION, SERVLET_MINOR_VERSIONFields inherited from class ScopedHandler
_nextScope, _outerScopeFields inherited from class HandlerWrapper
_handler -
Constructor Summary
ConstructorsConstructorDescriptionHttpSpiContextHandler(com.sun.net.httpserver.HttpContext httpContext, com.sun.net.httpserver.HttpHandler httpHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoScope(String target, Request baseRequest, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) Scope the handlercom.sun.net.httpserver.HttpHandlerprivate voidhandleAuthentication(javax.servlet.http.HttpServletResponse resp, com.sun.net.httpserver.HttpExchange httpExchange, com.sun.net.httpserver.Authenticator auth) voidsetHttpHandler(com.sun.net.httpserver.HttpHandler handler) Methods inherited from class ContextHandler
addAliasCheck, addEventListener, addLocaleEncoding, addProgrammaticListener, addVirtualHosts, callContextDestroyed, callContextInitialized, checkAlias, checkContext, checkContextPath, checkVirtualHost, clearAliasChecks, clearAttributes, contextDestroyed, contextInitialized, doHandle, doStart, doStop, dump, enterScope, exitScope, getAliasChecks, getAllowNullPathInfo, getAttribute, getAttributeNames, getAttributeNameSet, getAttributes, getBaseResource, getClassLoader, getClassPath, getContextHandler, getContextPath, getContextPathEncoded, getCurrentContext, getDisplayName, getErrorHandler, getEventListeners, getInitParameter, getInitParameterNames, getInitParams, getLocaleEncoding, getLocaleEncoding, getLocaleEncodings, getLogger, getMaxFormContentSize, getMaxFormKeys, getMimeTypes, getProtectedTargets, getRequestContextPath, getResource, getResourceBase, getResourcePaths, getServerInfo, getServletContext, getVirtualHosts, getWelcomeFiles, handle, handle, isAvailable, isCompactPath, isDurableListener, isProgrammaticListener, isProtectedTarget, isShutdown, isUsingSecurityManager, loadClass, newResource, newResource, newResource, removeAttribute, removeEventListener, removeVirtualHosts, requestDestroyed, requestInitialized, setAliasChecks, setAllowNullPathInfo, setAttribute, setAttributes, setAvailable, setBaseResource, setClassLoader, setCompactPath, setContextPath, setDisplayName, setErrorHandler, setEventListeners, setInitParameter, setLogger, setManagedAttribute, setMaxFormContentSize, setMaxFormKeys, setMimeTypes, setProtectedTargets, setResourceBase, setServer, setServerInfo, setUsingSecurityManager, setVirtualHosts, setWelcomeFiles, shutdown, startContext, stopContext, toStringMethods inherited from class ScopedHandler
handle, nextHandle, nextScopeMethods inherited from class HandlerWrapper
destroy, expandChildren, getHandler, getHandlers, insertHandler, setHandlerMethods inherited from class AbstractHandlerContainer
doShutdown, expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClassMethods inherited from class AbstractHandler
doError, getServerMethods inherited from class ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansMethods inherited from class AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Dumpable.DumpableContainer
isDumpableMethods inherited from interface LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Field Details
-
LOG
-
_httpContext
private com.sun.net.httpserver.HttpContext _httpContext -
_httpHandler
private com.sun.net.httpserver.HttpHandler _httpHandler
-
-
Constructor Details
-
HttpSpiContextHandler
public HttpSpiContextHandler(com.sun.net.httpserver.HttpContext httpContext, com.sun.net.httpserver.HttpHandler httpHandler)
-
-
Method Details
-
doScope
public void doScope(String target, Request baseRequest, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException, javax.servlet.ServletException Description copied from class:ScopedHandlerScope the handlerDerived implementations should call
ScopedHandler.nextScope(String, Request, HttpServletRequest, HttpServletResponse)- Overrides:
doScopein classContextHandler- Parameters:
target- The target of the request - either a URI or a name.baseRequest- The original unwrapped request object.req- The request either as theRequestobject or a wrapper of that request. Themethod can be used access the Request object if required.HttpConnection.getCurrentConnection().getHttpChannel().getRequest()resp- The response as theResponseobject or a wrapper of that request. Themethod can be used access the Response object if required.HttpConnection.getCurrentConnection().getHttpChannel().getResponse()- Throws:
IOException- if unable to handle the request or response processingjavax.servlet.ServletException- if unable to handle the request or response due to underlying servlet issue- See Also:
-
handleAuthentication
private void handleAuthentication(javax.servlet.http.HttpServletResponse resp, com.sun.net.httpserver.HttpExchange httpExchange, com.sun.net.httpserver.Authenticator auth) throws IOException - Throws:
IOException
-
getHttpHandler
public com.sun.net.httpserver.HttpHandler getHttpHandler() -
setHttpHandler
public void setHttpHandler(com.sun.net.httpserver.HttpHandler handler)
-