Package | org.puremvc.as3.patterns.proxy |
Class | public class Proxy |
Inheritance | Proxy Notifier |
Implements | INotifier, IProxy |
IProxy
implementation.
In PureMVC, Proxy
classes are used to manage parts of the
application's data model.
A Proxy
might simply manage a reference to a local data object,
in which case interacting with it might involve setting and
getting of its data in synchronous fashion.
Proxy
classes are also used to encapsulate the application's
interaction with remote services to save or retrieve data, in which case,
we adopt an asyncronous idiom; setting data (or calling a method) on the
Proxy
and listening for a Notification
to be sent
when the Proxy
has retrieved the data from the service.
See also
Property | Defined by | ||
---|---|---|---|
NAME : String = "Proxy" [static]
| Proxy |
Property | Defined by | ||
---|---|---|---|
data : Object | Proxy | ||
facade : IFacade | Notifier | ||
proxyName : String | Proxy |
Method | Defined by | ||
---|---|---|---|
Proxy(proxyName:String = null, data:Object = null)
Constructor
| Proxy | ||
getData():Object
Get the data object
| Proxy | ||
getProxyName():String
Get the proxy name
| Proxy | ||
onRegister():void
Called by the Model when the Proxy is registered
| Proxy | ||
onRemove():void
Called by the Model when the Proxy is removed
| Proxy | ||
sendNotification(notificationName:String, body:Object = null, type:String = null):void
Create and send an
INotification . | Notifier | ||
setData(data:Object):void
Set the data object
| Proxy |
data | property |
protected var data:Object
NAME | property |
public static var NAME:String = "Proxy"
proxyName | property |
protected var proxyName:String
Proxy | () | constructor |
public function Proxy(proxyName:String = null, data:Object = null)
Constructor
ParametersproxyName:String (default = null )
|
|
data:Object (default = null )
|
getData | () | method |
public function getData():Object
Get the data object
ReturnsObject |
getProxyName | () | method |
public function getProxyName():String
Get the proxy name
ReturnsString |
onRegister | () | method |
public function onRegister():void
Called by the Model when the Proxy is registered
onRemove | () | method |
public function onRemove():void
Called by the Model when the Proxy is removed
setData | () | method |
public function setData(data:Object):void
Set the data object
Parametersdata:Object |