Package | net.user1.reactor |
Class | public class AccountManagerEvent |
Inheritance | AccountManagerEvent ![]() |
Since : | Reactor 1.0.0 |
// The event-registration code reactor.getAccountManager().addEventListener( AccountManagerEvent.CREATE_ACCOUNT_RESULT, createAccountResultListener); // The event-listener code protected function createAccountResultListener (e:AccountManagerEvent):void { if (e.getStatus() == Status.SUCCESS) { // Display an "account created" message (displayAccountCreated() function // definition not shown) displayAccountCreated(); } }
See also
Method | Defined By | ||
---|---|---|---|
AccountManagerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, userID:String = null, account:UserAccount = null, status:String = null)
Constructor
| AccountManagerEvent | ||
clone():Event [override] | AccountManagerEvent | ||
Returns the UserAccount object pertaining to this account manager event. | AccountManagerEvent | ||
getStatus():String
Returns the status of the operation to which this event pertains. | AccountManagerEvent | ||
getUserID():String
Returns the user ID of the account to which this event pertains. | AccountManagerEvent | ||
toString():String [override] | AccountManagerEvent |
Constant | Defined By | ||
---|---|---|---|
ACCOUNT_ADDED : String = ACCOUNT_ADDED [static]
Dispatched when the AccountManager is informed by Union Server that a
user account was created. | AccountManagerEvent | ||
ACCOUNT_REMOVED : String = ACCOUNT_REMOVED [static]
Dispatched when the AccountManager is informed by Union Server that a
user account was deleted. | AccountManagerEvent | ||
CREATE_ACCOUNT_RESULT : String = CREATE_ACCOUNT_RESULT [static]
Dispatched when the result of an earlier call to AccountManager's
createAccount() method is received. | AccountManagerEvent | ||
REMOVE_ACCOUNT_RESULT : String = REMOVE_ACCOUNT_RESULT [static]
Dispatched when the result of an earlier call to AccountManager's
removeAccount() method is received. | AccountManagerEvent | ||
STOP_WATCHING_FOR_ACCOUNTS_RESULT : String = STOP_WATCHING_FOR_ACCOUNTS_RESULT [static]
Dispatched when the AccountManager receives the result of an earlier
stopWatchingForAccounts() request. | AccountManagerEvent | ||
SYNCHRONIZE : String = SYNCHRONIZE [static]
Dispatched when the AccountManager's list of user accounts has finished
synchronization after a watchForAccounts() request. | AccountManagerEvent | ||
WATCH_FOR_ACCOUNTS_RESULT : String = WATCH_FOR_ACCOUNTS_RESULT [static]
Dispatched when the AccountManager receives the result of an earlier
watchForAccounts() request. | AccountManagerEvent |
AccountManagerEvent | () | Constructor |
public function AccountManagerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, userID:String = null, account:UserAccount = null, status:String = null)
Constructor
Parameterstype:String | |
bubbles:Boolean (default = false )
| |
cancelable:Boolean (default = false )
| |
userID:String (default = null )
| |
account:UserAccount (default = null )
| |
status:String (default = null )
|
clone | () | method |
override public function clone():Event
ReturnsEvent |
getAccount | () | method |
public function getAccount():UserAccount
Since : | Reactor 1.0.0 |
Returns the UserAccount object pertaining to this account manager event. For example, for an AccountManagerEvent.ACCOUNT_REMOVED event, getAccount() returns the UserAccount object for the removed account.
ReturnsUserAccount |
getStatus | () | method |
public function getStatus():String
Since : | Reactor 1.0.0 |
Returns the status of the operation to which this event pertains. The getStatus() method's return value is always one of the Status class's constants. For example, if the AccountManagerEvent.CREATE_ACCOUNT_RESULT event occurs in response to a successful account-creation attempt, getStatus() will return the value of Status.SUCCESS. To respond to a status, compare the return of getStatus() to one of the Status constants. For example,
if (e.getStatus() == Status.SUCCESS) { showAccountCreatedScreen(); }
String |
See also
getUserID | () | method |
public function getUserID():String
Since : | Reactor 1.0.0 |
Returns the user ID of the account to which this event pertains. For example, for the AccountManagerEvent.ACCOUNT_ADDED event, getUserID() returns the userID of the account that was added to the server.
ReturnsString |
toString | () | method |
override public function toString():String
ReturnsString |
ACCOUNT_ADDED | Constant |
public static const ACCOUNT_ADDED:String = ACCOUNT_ADDED
Since : | Reactor 1.0.0 |
Dispatched when the AccountManager is informed by Union Server that a user account was created. This event is available when the AccountManager is watching for user accounts only (see watchForAccounts()).
See also
ACCOUNT_REMOVED | Constant |
public static const ACCOUNT_REMOVED:String = ACCOUNT_REMOVED
Since : | Reactor 1.0.0 |
Dispatched when the AccountManager is informed by Union Server that a user account was deleted. This event is available when the AccountManager is watching for user accounts only (see watchForAccounts()).
See also
CREATE_ACCOUNT_RESULT | Constant |
public static const CREATE_ACCOUNT_RESULT:String = CREATE_ACCOUNT_RESULT
Since : | Reactor 1.0.0 |
Dispatched when the result of an earlier call to AccountManager's createAccount() method is received. To determine the result of the account-creation request, use getStatus(), which has the following possible return values:
See also
REMOVE_ACCOUNT_RESULT | Constant |
public static const REMOVE_ACCOUNT_RESULT:String = REMOVE_ACCOUNT_RESULT
Since : | Reactor 1.0.0 |
Dispatched when the result of an earlier call to AccountManager's removeAccount() method is received. To determine the result of the account-removal request, use getStatus(), which has the following possible return values:
See also
STOP_WATCHING_FOR_ACCOUNTS_RESULT | Constant |
public static const STOP_WATCHING_FOR_ACCOUNTS_RESULT:String = STOP_WATCHING_FOR_ACCOUNTS_RESULT
Since : | Reactor 1.0.0 |
Dispatched when the AccountManager receives the result of an earlier stopWatchingForAccounts() request. To determine the result of the attempt, use getStatus(), which has the following possible return values:
See also
SYNCHRONIZE | Constant |
public static const SYNCHRONIZE:String = SYNCHRONIZE
Since : | Reactor 1.0.0 |
Dispatched when the AccountManager's list of user accounts has finished synchronization after a watchForAccounts() request.
See also
WATCH_FOR_ACCOUNTS_RESULT | Constant |
public static const WATCH_FOR_ACCOUNTS_RESULT:String = WATCH_FOR_ACCOUNTS_RESULT
Since : | Reactor 1.0.0 |
Dispatched when the AccountManager receives the result of an earlier watchForAccounts() request. To determine the result of the request, use getStatus(), which has the following possible return values:
See also