Package org.eclipse.jetty.server.session
Class SessionContext
java.lang.Object
org.eclipse.jetty.server.session.SessionContext
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 Summary
FieldsModifier and TypeFieldDescriptionprivate String
private ContextHandler.Context
private SessionHandler
private String
private String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
canonicalize
(String path) Make an acceptable name from a context path.private String
private String
canonicalizeVHost
(ContextHandler.Context context) Get the first virtual host for the context.getVhost()
void
Run a runnable in the context (with context classloader set) if there is one, otherwise just run it.toString()
-
Field Details
-
NULL_VHOST
- See Also:
-
_context
-
_sessionHandler
-
_workerName
-
_canonicalContextPath
-
_vhost
-
-
Constructor Details
-
SessionContext
-
-
Method Details
-
getWorkerName
-
getSessionHandler
-
getContext
-
getCanonicalContextPath
-
getVhost
-
toString
-
run
Run a runnable in the context (with context classloader set) if there is one, otherwise just run it.- Parameters:
r
- the runnable
-
canonicalizeContextPath
-
canonicalizeVHost
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
Make an acceptable name from a context path.- Parameters:
path
- the path to normalize/fix- Returns:
- the clean/acceptable form of the path
-