Class Session


  • public class Session
    extends java.lang.Object
    The session is the value object for the session of a user.
    • Constructor Summary

      Constructors 
      Constructor Description
      Session​(java.lang.String accessToken, java.util.Date expirationDate)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Session fromAPIResponse​(org.json.JSONObject apiResponse)  
      java.lang.String getAccessToken()
      The session's access token.
      java.util.Date getExpirationDate()
      The expiration date of the access token.
      boolean hasExpired()
      Uses the current locale's time to check whether or not this session has already expired.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Session

        public Session​(java.lang.String accessToken,
                       java.util.Date expirationDate)
    • Method Detail

      • getAccessToken

        public java.lang.String getAccessToken()
        The session's access token.
      • getExpirationDate

        public java.util.Date getExpirationDate()
        The expiration date of the access token.
      • hasExpired

        public boolean hasExpired()
        Uses the current locale's time to check whether or not this session has already expired.
        Returns:
        Whether or not the session has already expired.
      • fromAPIResponse

        public static Session fromAPIResponse​(org.json.JSONObject apiResponse)
                                       throws org.json.JSONException
        Throws:
        org.json.JSONException