com.parse

## Class ParseSession

- java.lang.Object
- - com.parse.ParseObject
  - - com.parse.ParseSession

    public class ParseSession
    extends ParseObject

The `ParseSession` is a local representation of session data that can be saved and retrieved from the Parse cloud.

### Field Summary

### Fields inherited from class com.parse.ParseObject

`DEFAULT_PIN`

### Constructor Summary

Constructors
Constructor and Description
`ParseSession()`

### Method Summary

Methods
`static Task<ParseSession>` `getCurrentSessionInBackground()` Get the current `ParseSession` object related to the current user.
`static void` `getCurrentSessionInBackground(GetCallback<ParseSession> callback)` Get the current `ParseSession` object related to the current user.
`static ParseQuery<ParseSession>` `getQuery()` Constructs a query for `ParseSession`.
`String` `getSessionToken()`

### Methods inherited from class com.parse.ParseObject

`add, addAll, addAllUnique, addUnique, containsKey, create, create, createWithoutData, createWithoutData, delete, deleteAll, deleteAllInBackground, deleteAllInBackground, deleteEventually, deleteEventually, deleteInBackground, deleteInBackground, fetch, fetchAll, fetchAllIfNeeded, fetchAllIfNeededInBackground, fetchAllIfNeededInBackground, fetchAllInBackground, fetchAllInBackground, fetchFromLocalDatastore, fetchFromLocalDatastoreInBackground, fetchIfNeeded, fetchIfNeededInBackground, fetchIfNeededInBackground, fetchInBackground, fetchInBackground, get, getACL, getBoolean, getBytes, getClassName, getCreatedAt, getDate, getDouble, getInt, getJSONArray, getJSONObject, getList, getLong, getMap, getNumber, getObjectId, getParseFile, getParseGeoPoint, getParseObject, getParseUser, getRelation, getString, getUpdatedAt, has, hasSameId, increment, increment, isDataAvailable, isDirty, isDirty, keySet, pin, pin, pinAll, pinAll, pinAllInBackground, pinAllInBackground, pinAllInBackground, pinAllInBackground, pinInBackground, pinInBackground, pinInBackground, pinInBackground, put, refresh, refreshInBackground, registerSubclass, remove, removeAll, revert, revert, save, saveAll, saveAllInBackground, saveAllInBackground, saveEventually, saveEventually, saveInBackground, saveInBackground, setACL, setObjectId, unpin, unpin, unpinAll, unpinAll, unpinAll, unpinAll, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinAllInBackground, unpinInBackground, unpinInBackground, unpinInBackground, unpinInBackground`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ParseSession

    public ParseSession()

### Method Detail

#### getCurrentSessionInBackground

    public static Task<ParseSession> getCurrentSessionInBackground()

Get the current `ParseSession` object related to the current user.

Returns:
  A task that resolves a `ParseSession` object or `null` if not valid or logged in.

#### getCurrentSessionInBackground

    public static void getCurrentSessionInBackground(GetCallback<ParseSession> callback)

Get the current `ParseSession` object related to the current user.

Parameters:
  `callback` - A callback that returns a `ParseSession` object or `null` if not valid or logged in.

#### getQuery

    public static ParseQuery<ParseSession> getQuery()

Constructs a query for `ParseSession`.

See Also:
  `ParseQuery.getQuery(Class)`

#### getSessionToken

    public String getSessionToken()

Returns:
  the session token for a user, if they are logged in.