Top Description Methods
org.eclipse.jetty.session

public Interface SessionIdManager

extends LifeCycle
Known Direct Implementers
org.eclipse.jetty.session.DefaultSessionIdManager
Imports
org.eclipse.jetty.server.Request, org.eclipse.jetty.util.component.LifeCycle

Session ID Manager. Manages session IDs across multiple contexts.

Method Summary

Modifier and TypeMethod and Description
public void
expireAll(String
The session ID without any cluster node extension
id
)

Expire all sessions on all contexts that share the same id.

public String

Returns:

The session id qualified with the worker name
getExtendedId
(String
The id of the session
id
,
Request
The request that for the session (or null)
request
)

Get an extended id for a session.

public String

Returns:

the cluster id
getId
(String
the session id including the worker name
qualifiedId
)

Get just the session id from an id that includes the worker name as a suffix.

public HouseKeeper
getSessionHouseKeeper()

Returns: the housekeeper for doing scavenging

public String
getWorkerName()

Returns: the unique name of this server instance

public void
invalidateAll(String
the session id
id
)

Invalidate all sessions on all contexts that share the same id.

public boolean
isIdInUse(String
The plain session ID (ie no workername extension)
id
)

Returns: True if the session ID is in use by at least one context.

public String

Returns:

the new session id
newSessionId
(Request
the request asking for a new session
request
,
String
the session id requested by the session
requestedId
,
long
the timestamp for when the session was created
created
)

Create a new Session ID.

public String

Returns:

the new session id
renewSessionId
(String
the old plain session id
oldId
,
String
the old fully qualified id
oldExtendedId
,
Request
the request containing the session
request
)

Change the existing session id.

public void
public void
setSessionHouseKeeper(HouseKeeper
the housekeeper for doing scavenging
houseKeeper
)

Set the housekeeper for doing scavenging.

Inherited from org.eclipse.jetty.util.component.LifeCycle:
addEventListenerisFailedisRunningisStartedisStartingisStoppedisStoppingremoveEventListenerstartstartstopstop

Method Detail

expireAllback to summary
public void expireAll(String id)

Expire all sessions on all contexts that share the same id.

Parameters
id:String

The session ID without any cluster node extension

getExtendedIdback to summary
public String getExtendedId(String id, Request request)

Get an extended id for a session. An extended id contains the workername as a suffix.

Parameters
id:String

The id of the session

request:Request

The request that for the session (or null)

Returns:String

The session id qualified with the worker name

getIdback to summary
public String getId(String qualifiedId)

Get just the session id from an id that includes the worker name as a suffix. Strip node identifier from a located session ID.

Parameters
qualifiedId:String

the session id including the worker name

Returns:String

the cluster id

getSessionHouseKeeperback to summary
public HouseKeeper getSessionHouseKeeper()
Returns:HouseKeeper

the housekeeper for doing scavenging

getWorkerNameback to summary
public String getWorkerName()
Returns:String

the unique name of this server instance

invalidateAllback to summary
public void invalidateAll(String id)

Invalidate all sessions on all contexts that share the same id.

Parameters
id:String

the session id

isIdInUseback to summary
public boolean isIdInUse(String id)
Parameters
id:String

The plain session ID (ie no workername extension)

Returns:boolean

True if the session ID is in use by at least one context.

newSessionIdback to summary
public String newSessionId(Request request, String requestedId, long created)

Create a new Session ID.

Parameters
request:Request

the request asking for a new session

requestedId:String

the session id requested by the session

created:long

the timestamp for when the session was created

Returns:String

the new session id

renewSessionIdback to summary
public String renewSessionId(String oldId, String oldExtendedId, Request request)

Change the existing session id.

Parameters
oldId:String

the old plain session id

oldExtendedId:String

the old fully qualified id

request:Request

the request containing the session

Returns:String

the new session id

scavengeback to summary
public void scavenge()
setSessionHouseKeeperback to summary
public void setSessionHouseKeeper(HouseKeeper houseKeeper)

Set the housekeeper for doing scavenging.

Parameters
houseKeeper:HouseKeeper

the housekeeper for doing scavenging