A context for handling an Request.
Every request has a non-null context, which may initially
be the server context, or
a context provided by a ContextHandler.
A Context:
context path that is a prefix to all URIs handled by the Contextvirtual hosts that the Context is applicable to.ClassLoader that that is set as the Thread context ClassLoader
for Threads handling the request.java.util.concurrent.Executor that can execute jobs in with the Thread context ClassLoaderorg.eclipse.jetty.util.Decorator using the DecoratedObjectFactory that can create objects specific to the context.temporary director specific to the context.Server#getContext()
| Modifier and Type | Method and Description |
|---|---|
| public void | execute(Runnable
the task to run task)Redeclares java. Executes the given task in a thread scoped to this Context. |
| public Resource | getBaseResource()
Returns: the base resource used to lookup other resources specified by the request URI path |
| public ClassLoader | |
| public String | |
| public Request. | |
| public MimeTypes | |
| public default String | Returns: the URI path scoped to this Context, ornull if the full path does not match this Context.
The empty string is returned if the full path is exactly the context path.a full URI path that should be canonically encoded as
per canonicallyEncodedPath)org.Returns the URI path scoped to this Context. |
| public static String | Returns: the URIencodedPath scoped to the encodedContextPath,
or null if the encodedPath does not match the context.
The empty string is returned if the encodedPath is exactly the encodedContextPath.The context path that should be canonically encoded as
per encodedContextPath, String org..a full URI path that should be canonically encoded as
per encodedPath)org..Returns the URI path scoped to the passed context path. |
| public File | getTempDirectory()
Returns: a non- |
| public List | |
| public void | |
| public void |
| execute | back to summary |
|---|---|
| public void execute(Runnable task) Redeclares java. Executes the given task in a thread scoped to this Context.
| |
| getBaseResource | back to summary |
|---|---|
public Resource getBaseResource()
| |
| getClassLoader | back to summary |
|---|---|
public ClassLoader getClassLoader()
| |
| getContextPath | back to summary |
|---|---|
public String getContextPath()
| |
| getErrorHandler | back to summary |
|---|---|
public Request.
| |
| getMimeTypes | back to summary |
|---|---|
public MimeTypes getMimeTypes()
| |
| getPathInContext | back to summary |
|---|---|
| public default String getPathInContext(String canonicallyEncodedPath) Returns the URI path scoped to this Context.
| |
| getPathInContext | back to summary |
|---|---|
| public static String getPathInContext(String encodedContextPath, String encodedPath) Returns the URI path scoped to the passed context path. For example, if the context path passed is
| |
| getTempDirectory | back to summary |
|---|---|
public File getTempDirectory()
| |
| getVirtualHosts | back to summary |
|---|---|
| public List | |
| run | back to summary |
|---|---|
| public void run(Runnable task) Runs the given task in the current thread scoped to this Context.
| |
| run | back to summary |
|---|---|
| public void run(Runnable task, Request request) Runs the given task in the current thread scoped to this Context and the given Request. | |