Subject.getSession

Returns the application {@code Session} associated with this Subject. Based on the bool argument, this method functions as follows: <ul> <li>If there is already an existing session associated with this {@code Subject}, it is returned and the {@code create} argument is ignored.</li> <li>If no session exists and {@code create} is {@code true}, a new session will be created, associated with this {@code Subject} and then returned.</li> <li>If no session exists and {@code create} is {@code false}, {@code null} is returned.</li> </ul>

@param create bool argument determining if a new session should be created or not if there is no existing session. @return the application {@code Session} associated with this {@code Subject} or {@code null} based on the above described logic.

  1. Session getSession()
  2. Session getSession(bool create)
    interface Subject
    getSession
    (
    bool create
    )

Meta