Top Description Constructors Methods
io.undertow.util

public Class Sessions

extends Object
Class Inheritance
Imports
io.undertow.UndertowMessages, io.undertow.server.HttpServerExchange, io.undertow.server.session.Session, .SessionConfig, .SessionManager

Utility class for working with sessions.
Author
Stuart Douglas

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Session

Returns:

The session
getOrCreateSession
(final HttpServerExchange
The exchange
exchange
)

Gets the active session, creating a new one if one does not exist

public static Session

Returns:

The session
getSession
(final HttpServerExchange
The exchange
exchange
)

Gets the active session, returning null if one is not present.

private static Session
getSession(final HttpServerExchange exchange, boolean create)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Sessionsback to summary
private Sessions()

Method Detail

getOrCreateSessionback to summary
public static Session getOrCreateSession(final HttpServerExchange exchange)

Gets the active session, creating a new one if one does not exist

Parameters
exchange:HttpServerExchange

The exchange

Returns:Session

The session

getSessionback to summary
public static Session getSession(final HttpServerExchange exchange)

Gets the active session, returning null if one is not present.

Parameters
exchange:HttpServerExchange

The exchange

Returns:Session

The session

getSessionback to summary
private static Session getSession(final HttpServerExchange exchange, boolean create)