Class UserSession

java.lang.Object
org.deltava.security.UserSession
All Implemented Interfaces:
Serializable, Comparable<UserSession>

public class UserSession extends Object implements Serializable, Comparable<UserSession>
A bean to store data about a User session.
Since:
1.0
Version:
9.0
Author:
Luke
See Also:
  • Constructor Details

    • UserSession

      public UserSession(Pilot p, String sessionID, IPBlock addrInfo, String userAgent)
      Creates a new User session bean.
      Parameters:
      p - the Pilot associated with this session
      sessionID - the HTTP session ID
      addrInfo - the IP block info
      userAgent - the user-agent header
  • Method Details

    • getPerson

      public Pilot getPerson()
      Returns the authenticated User associated with this session.
      Returns:
      the Person
    • getSessionID

      String getSessionID()
      Returns the HTTP session ID.
      Returns:
      the HTTP session ID
    • getAddressInfo

      public IPBlock getAddressInfo()
      Returns information about the IP address block.
      Returns:
      an IPBlock bean
    • getUserAgent

      public String getUserAgent()
      Returns the User-Agent header.
      Returns:
      the user-agent
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(UserSession usr2)
      Specified by:
      compareTo in interface Comparable<UserSession>