Package org.eclipse.jetty.server.handler
Class ContextHandler.ScopedContext
java.lang.Object
org.eclipse.jetty.util.Attributes.Wrapper
org.eclipse.jetty.util.Attributes.Layer
org.eclipse.jetty.server.handler.ContextHandler.ScopedContext
- All Implemented Interfaces:
Executor
,Context
,Attributes
,Decorator
- Direct Known Subclasses:
ServletContextHandler.ServletScopedContext
- Enclosing class:
- ContextHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
Attributes.Layer, Attributes.Lazy, Attributes.Mapped, Attributes.Synthetic, Attributes.Wrapper
-
Field Summary
Fields inherited from interface org.eclipse.jetty.util.Attributes
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
call
(Invocable.Callable callable, Request request) <T> T
decorate
(T o) void
void
Executes the given task in a thread scoped to this Context.void
<H extends ContextHandler>
HgetCrossContextDispatchType
(Request request) Get any cross context dispatch typeprotected DecoratedObjectFactory
getPathInContext
(String canonicallyEncodedPath) Returns the URI path scoped to this Context.boolean
isCrossContextDispatch
(Request request) Check cross context dispatch statusvoid
Runs the given task in the current thread scoped to this Context.void
Runs the given task in the current thread scoped to this Context and the given Request.<T> boolean
toString()
Methods inherited from class org.eclipse.jetty.util.Attributes.Layer
clearAttributes, getAttribute, getAttributeNameSet, getPersistentAttributes, removeAttribute, setAttribute
Methods inherited from class org.eclipse.jetty.util.Attributes.Wrapper
equals, getWrapped, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.Attributes
asAttributeMap, clearAttributes, equals, getAttribute, getAttributeNameSet, hashCode, removeAttribute, setAttribute
-
Constructor Details
-
ScopedContext
public ScopedContext()
-
-
Method Details
-
getContextHandler
-
getErrorHandler
- Specified by:
getErrorHandler
in interfaceContext
- Returns:
- the error
Request.Handler
associated with this Context
-
getContextPath
- Specified by:
getContextPath
in interfaceContext
- Returns:
- the encoded context path of this
Context
ornull
-
getMimeTypes
- Specified by:
getMimeTypes
in interfaceContext
- Returns:
- the mime types associated with this Context
-
toString
-
getClassLoader
- Specified by:
getClassLoader
in interfaceContext
- Returns:
- the
ClassLoader
associated with this Context
-
getBaseResource
- Specified by:
getBaseResource
in interfaceContext
- Returns:
- the base resource used to lookup other resources specified by the request URI path
-
getTempDirectory
- Specified by:
getTempDirectory
in interfaceContext
- Returns:
- a non-
null
temporary directory, configured either for the context, the server or the JVM
-
getVirtualHosts
- Specified by:
getVirtualHosts
in interfaceContext
- Returns:
- a list of virtual host names associated with this Context
-
call
- Throws:
Exception
-
test
-
accept
-
run
Description copied from interface:Context
Runs the given task in the current thread scoped to this Context.
-
run
Description copied from interface:Context
Runs the given task in the current thread scoped to this Context and the given Request.
-
execute
Description copied from interface:Context
Executes the given task in a thread scoped to this Context.
-
execute
-
getDecoratedObjectFactory
-
decorate
public <T> T decorate(T o) -
destroy
-
getPathInContext
Description copied from interface:Context
Returns the URI path scoped to this Context.
- Specified by:
getPathInContext
in interfaceContext
- Parameters:
canonicallyEncodedPath
- a full URI path that should be canonically encoded as perURIUtil.canonicalPath(String)
- Returns:
- the URI path scoped to this Context, or
null
if the full path does not match this Context. The empty string is returned if the full path is exactly the context path. - See Also:
-
isCrossContextDispatch
Description copied from interface:Context
Check cross context dispatch status- Specified by:
isCrossContextDispatch
in interfaceContext
- Parameters:
request
- The request to check- Returns:
True
IFF this contextsupports cross context
and the passed request is a cross context request.
-
getCrossContextDispatchType
Description copied from interface:Context
Get any cross context dispatch type- Specified by:
getCrossContextDispatchType
in interfaceContext
- Parameters:
request
- The request to get the type for- Returns:
- A String representation of a dispatcher type iff this context
supports cross context
and the passed request is a cross context request, otherwise null.
-