Packagecom.distriqt.extension.firebase.database
Interfacepublic interface OnDisconnect extends flash.events.IEventDispatcher

The OnDisconnect class is used to manage operations that will be run on the server when this client disconnects. It can be used to add or remove data based on a client's connection status. It is very useful in applications looking for 'presence' functionality.



Public Methods
 MethodDefined By
  
cancel():Boolean
Cancel any disconnect operations that are queued up at this location
OnDisconnect
  
removeValue():Boolean
Remove the value at this location when the client disconnects
OnDisconnect
  
setValue(value:*, priority:String = null):Boolean
Ensure the data at this location is set to the specified value and priority when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).
OnDisconnect
  
updateChildren(update:Object):Boolean
Ensure the data has the specified child values updated when the client is disconnected
OnDisconnect
Method Detail
cancel()method
public function cancel():Boolean

Cancel any disconnect operations that are queued up at this location

Returns
Booleantrue if successfully started and false if the extension is in an invalid state or if the value provided is an unsupported type
removeValue()method 
public function removeValue():Boolean

Remove the value at this location when the client disconnects

Returns
Booleantrue if successfully started and false if the extension is in an invalid state or if the value provided is an unsupported type
setValue()method 
public function setValue(value:*, priority:String = null):Boolean

Ensure the data at this location is set to the specified value and priority when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).

Parameters

value:* — The value to set at this location
 
priority:String (default = null) — The priority to set at this location

Returns
Booleantrue if successfully started and false if the extension is in an invalid state or if the value provided is an unsupported type
updateChildren()method 
public function updateChildren(update:Object):Boolean

Ensure the data has the specified child values updated when the client is disconnected

Parameters

update:Object — The update(s) to apply to the children

Returns
Booleantrue if successfully started and false if the extension is in an invalid state or if the value provided is an unsupported type