Class SessionContext

java.lang.Object
org.eclipse.jetty.server.session.SessionContext

public class SessionContext extends Object
SessionContext Information about the context to which sessions belong: the Context, the SessionHandler of the context, and the unique name of the node. A SessionHandler is 1:1 with a SessionContext.
  • Field Details

  • Constructor Details

  • Method Details

    • getWorkerName

      public String getWorkerName()
    • getSessionHandler

      public SessionHandler getSessionHandler()
    • getContext

      public ContextHandler.Context getContext()
    • getCanonicalContextPath

      public String getCanonicalContextPath()
    • getVhost

      public String getVhost()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • run

      public void run(Runnable r)
      Run a runnable in the context (with context classloader set) if there is one, otherwise just run it.
      Parameters:
      r - the runnable
    • canonicalizeContextPath

      private String canonicalizeContextPath(ContextHandler.Context context)
    • canonicalizeVHost

      private String canonicalizeVHost(ContextHandler.Context context)
      Get the first virtual host for the context. Used to help identify the exact session/contextPath.
      Returns:
      0.0.0.0 if no virtual host is defined
    • canonicalize

      private String canonicalize(String path)
      Make an acceptable name from a context path.
      Parameters:
      path - the path to normalize/fix
      Returns:
      the clean/acceptable form of the path