|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<SessionState>
com.facebook.SessionState
public enum SessionState
Identifies the state of a Session.
Session objects implement a state machine that controls their lifecycle. This enum represents the states of the state machine.
Enum Constant Summary | |
---|---|
CLOSED
Indicates that the Session was closed normally. |
|
CLOSED_LOGIN_FAILED
Indicates that the Session is closed, and that it was not closed normally. |
|
CREATED
Indicates that the Session has not yet been opened and has no cached token. |
|
CREATED_TOKEN_LOADED
Indicates that the Session has not yet been opened and has a cached token. |
|
OPENED
Indicates that the Session is opened. |
|
OPENED_TOKEN_UPDATED
Indicates that the Session is opened and that the token has changed. |
|
OPENING
Indicates that the Session is in the process of opening. |
Method Summary | |
---|---|
boolean |
isClosed()
Returns a boolean indicating whether the state represents a closed Session that can no longer be used with a Request . |
boolean |
isOpened()
Returns a boolean indicating whether the state represents a successfully opened state in which the Session can be used with a Request . |
static SessionState |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SessionState[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final SessionState CREATED
public static final SessionState CREATED_TOKEN_LOADED
Indicates that the Session has not yet been opened and has a cached token. Opening a Session in this state will not involve user interaction.
If you are using Session from an Android Service, you must provide a TokenCachingStrategy implementation that contains a valid token to the Session constructor. The resulting Session will be created in this state, and you can then safely call open, passing null for the Activity.
public static final SessionState OPENING
public static final SessionState OPENED
Request
.
public static final SessionState OPENED_TOKEN_UPDATED
Indicates that the Session is opened and that the token has changed. In
this state, the Session may be used with Request
.
Every time the token is updated, StatusCallback
is called with this value.
public static final SessionState CLOSED_LOGIN_FAILED
StatusCallback
will
be non-null.
public static final SessionState CLOSED
Method Detail |
---|
public static SessionState[] values()
for (SessionState c : SessionState.values()) System.out.println(c);
public static SessionState valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic boolean isOpened()
Request
.
Request
.public boolean isClosed()
Request
.
Request
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |