Top Description Fields Constructors Methods
org.eclipse.jetty.session

public Class SessionContext

extends Object
Class Inheritance
Imports
java.util.List, .Objects, org.eclipse.jetty.server.Context, org.eclipse.jetty.util.StringUtil

SessionContext Information about the context to which sessions belong: the Context, the SessionManager of the context, and the unique name of the node. A SessionManager is 1:1 with a SessionContext.

Field Summary

Modifier and TypeField and Description
protected String
protected Context
protected SessionManager
protected String
protected String
public static final String

Constructor Summary

AccessConstructor and Description
protected
public

Method Summary

Modifier and TypeMethod and Description
private String

Returns:

the clean/acceptable form of the path
canonicalize
(String
the path to normalize/fix
path
)

Make an acceptable name from a context path.

private String
private String

Returns:

0.0.0.0 if no virtual host is defined
canonicalizeVHost
(Context context)

Get the first virtual host for the context.

public String
public Context
public SessionManager
public String
public String
public void
run(Runnable
the runnable
r
)

Run a runnable in the context (with context classloader set) if there is one, otherwise just run it.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_canonicalContextPathback to summary
protected String _canonicalContextPath
_contextback to summary
protected Context _context
_sessionManagerback to summary
protected SessionManager _sessionManager
_vhostback to summary
protected String _vhost
_workerNameback to summary
protected String _workerName
NULL_VHOSTback to summary
public static final String NULL_VHOST

Constructor Detail

SessionContextback to summary
protected SessionContext()
SessionContextback to summary
public SessionContext(SessionManager sessionManager)

Method Detail

canonicalizeback to summary
private String canonicalize(String path)

Make an acceptable name from a context path.

Parameters
path:String

the path to normalize/fix

Returns:String

the clean/acceptable form of the path

canonicalizeContextPathback to summary
private String canonicalizeContextPath(Context context)
canonicalizeVHostback to summary
private String canonicalizeVHost(Context context)

Get the first virtual host for the context. Used to help identify the exact session/contextPath.

Returns:String

0.0.0.0 if no virtual host is defined

getCanonicalContextPathback to summary
public String getCanonicalContextPath()
getContextback to summary
public Context getContext()
getSessionManagerback to summary
public SessionManager getSessionManager()
getVhostback to summary
public String getVhost()
getWorkerNameback to summary
public String getWorkerName()
runback to summary
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:Runnable

the runnable

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override