PureMVC AS3 Framework - [Standard Version] | All Packages | All Classes | Index | Frames No Frames |
Interface IProxy

Package | org.puremvc.as3.interfaces
Interface | public interface IProxy
Implementors | Proxy

The interface definition for a PureMVC Proxy.

In PureMVC, `IProxy` implementors assume these responsibilities:

- Implement a common method which returns the name of the Proxy.
- Provide methods for setting and getting the data object.

Additionally, `IProxy`s typically:

- Maintain references to one or more pieces of model data.
- Provide methods for manipulating that data.
- Generate `INotifications` when their model data changes.
- Expose their name as a `public static const` called `NAME`, if they are not instantiated multiple times.
- Encapsulate interaction with local or remote services used to fetch and persist model data.

Public Methods

| Method | Defined by
--- | --- | ---
|  | getData():Object Get the data object | IProxy
|  | getProxyName():String Get the Proxy name | IProxy
|  | onRegister():void Called by the Model when the Proxy is registered | IProxy
|  | onRemove():void Called by the Model when the Proxy is removed | IProxy
|  | setData(data:Object):void Set the data object | IProxy

Method detail

getData | () | method

`public function getData():Object`

Get the data object

Returns

| `Object` — the data as type Object

getProxyName | () | method |

`public function getProxyName():String`

Get the Proxy name

Returns

| `String` — the Proxy instance name

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` — the data object