Class Context.Wrapper

java.lang.Object
org.eclipse.jetty.server.Context.Wrapper
All Implemented Interfaces:
Executor, Context, Attributes, Decorator
Enclosing interface:
Context

public static class Context.Wrapper extends Object implements Context
  • Constructor Details

    • Wrapper

      public Wrapper(Context context)
  • Method Details

    • decorate

      public <T> T decorate(T o)
      Specified by:
      decorate in interface Decorator
    • destroy

      public void destroy(Object o)
      Specified by:
      destroy in interface Decorator
    • getContextPath

      public String getContextPath()
      Specified by:
      getContextPath in interface Context
      Returns:
      the encoded context path of this Context or null
    • getClassLoader

      public ClassLoader getClassLoader()
      Specified by:
      getClassLoader in interface Context
      Returns:
      the ClassLoader associated with this Context
    • getBaseResource

      public Resource getBaseResource()
      Specified by:
      getBaseResource in interface Context
      Returns:
      the base resource used to lookup other resources specified by the request URI path
    • getErrorHandler

      public Request.Handler getErrorHandler()
      Specified by:
      getErrorHandler in interface Context
      Returns:
      the error Request.Handler associated with this Context
    • getVirtualHosts

      public List<String> getVirtualHosts()
      Specified by:
      getVirtualHosts in interface Context
      Returns:
      a list of virtual host names associated with this Context
    • getMimeTypes

      public MimeTypes getMimeTypes()
      Specified by:
      getMimeTypes in interface Context
      Returns:
      the mime types associated with this Context
    • execute

      public void execute(Runnable task)
      Description copied from interface: Context

      Executes the given task in a thread scoped to this Context.

      Specified by:
      execute in interface Context
      Specified by:
      execute in interface Executor
      Parameters:
      task - the task to run
      See Also:
    • removeAttribute

      public Object removeAttribute(String name)
      Description copied from interface: Attributes
      Remove an attribute
      Specified by:
      removeAttribute in interface Attributes
      Parameters:
      name - the attribute to remove
      Returns:
      the value of the attribute if removed, else null
    • setAttribute

      public Object setAttribute(String name, Object attribute)
      Description copied from interface: Attributes
      Set an attribute
      Specified by:
      setAttribute in interface Attributes
      Parameters:
      name - the attribute to set
      attribute - the value to set. A null value is equivalent to removing the attribute.
      Returns:
      the previous value of the attribute if set, else null
    • getAttribute

      public Object getAttribute(String name)
      Description copied from interface: Attributes
      Get an attribute by name. Some attributes may be "hidden" attributes, in that they are only found by an explicit call to getAttribute(String) and they do not otherwise appear in Attributes.getAttributeNameSet() or Attributes.asAttributeMap().
      Specified by:
      getAttribute in interface Attributes
      Parameters:
      name - the attribute to get
      Returns:
      the value of the attribute, or null if no such attribute exists
    • getAttributeNameSet

      public Set<String> getAttributeNameSet()
      Description copied from interface: Attributes
      Get the immutable set of attribute names.
      Specified by:
      getAttributeNameSet in interface Attributes
      Returns:
      Set of attribute names, or an empty set if there are no attributes.
    • run

      public void run(Runnable task)
      Description copied from interface: Context

      Runs the given task in the current thread scoped to this Context.

      Specified by:
      run in interface Context
      Parameters:
      task - the task to run
      See Also:
    • run

      public void run(Runnable task, Request request)
      Description copied from interface: Context

      Runs the given task in the current thread scoped to this Context and the given Request.

      Specified by:
      run in interface Context
      Parameters:
      task - the task to run
      request - the HTTP request to use in the scope
    • getTempDirectory

      public File getTempDirectory()
      Specified by:
      getTempDirectory in interface Context
      Returns:
      a non-null temporary directory, configured either for the context, the server or the JVM