Packagenet.user1.reactor
Classpublic class AccountManagerEvent
InheritanceAccountManagerEvent Inheritance flash.events.Event

Since : Reactor 1.0.0

AccountManagerEvent is a simple data class used to pass information from the AccountManager to registered event-listeners when an account management event occurs. The AccountManagerEvent class also defines constants representing the available account management events. To register for an account management event, use the AccountManager class's addEventListener() method. The following code demonstrates:
   // 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

AccountManager
AccountEvent


Public Methods
 MethodDefined 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
Public Constants
 ConstantDefined 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
Constructor Description
AccountManagerEvent()Constructor
public function AccountManagerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, userID:String = null, account:UserAccount = null, status:String = null)

Constructor

Parameters
type:String
 
bubbles:Boolean (default = false)
 
cancelable:Boolean (default = false)
 
userID:String (default = null)
 
account:UserAccount (default = null)
 
status:String (default = null)
Method Descriptions
clone()method
override public function clone():Event

Returns
Event
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.

Returns
UserAccount
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();
     }
For a list of specific status values that can be returned during a particular event, see the documentation for that event.

Returns
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.

Returns
String
toString()method 
override public function toString():String

Returns
String
Constant Descriptions
ACCOUNT_ADDEDConstant
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_REMOVEDConstant 
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_RESULTConstant 
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_RESULTConstant 
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_RESULTConstant 
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

SYNCHRONIZEConstant 
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_RESULTConstant 
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