Class Sessions

java.lang.Object
io.undertow.util.Sessions

public class Sessions extends Object
Utility class for working with sessions.
Author:
Stuart Douglas
  • Method Details

    • getSession

      public static Session getSession(HttpServerExchange exchange)
      Gets the active session, returning null if one is not present.
      Parameters:
      exchange - The exchange
      Returns:
      The session
    • getOrCreateSession

      public static Session getOrCreateSession(HttpServerExchange exchange)
      Gets the active session, creating a new one if one does not exist
      Parameters:
      exchange - The exchange
      Returns:
      The session