Packageorg.puremvc.as3.patterns.proxy
Classpublic class Proxy
InheritanceProxy Inheritance Notifier
ImplementsINotifier, IProxy

A base 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

Model


Public Properties
 PropertyDefined by
  NAME : String = "Proxy"
[static]
Proxy
Protected Properties
 PropertyDefined by
  data : Object
Proxy
 Inheritedfacade : IFacade
Notifier
  proxyName : String
Proxy
Public Methods
 MethodDefined 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
 Inherited
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
Property detail
dataproperty
protected var data:Object
NAMEproperty 
public static var NAME:String = "Proxy"
proxyNameproperty 
protected var proxyName:String
Constructor detail
Proxy()constructor
public function Proxy(proxyName:String = null, data:Object = null)

Constructor

Parameters
proxyName:String (default = null)
 
data:Object (default = null)
Method detail
getData()method
public function getData():Object

Get the data object

Returns
Object
getProxyName()method 
public function getProxyName():String

Get the proxy name

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

Parameters
data:Object