Proxy Class
A base IProxy implementation.
In PureMVC, IProxy implementors assume these responsibilities:
- Implement a common method which returns the name of the IProxy.
- Provide methods for setting and getting a Data Object.
Additionally, IProxys typically:
- Provide methods for manipulating the Data Object and referencing it by type.
- Generate INotifications when their Data Object changes.
- Expose their name as a
static final String
calledNAME
. - Encapsulate interaction with local or remote services used to fetch and persist data.
See IModel
Extends
Notifier > Proxy
Implements
Constructors
Code new Proxy(String name, [data]) #
Constructor
- Param name - the name this IProxy will be registered with.
- Param data - the Data Object (optional)
Proxy( String this.name, [Dynamic this.data] ){ }
Methods
Code getData() #
Get the dataObject
.
- Returns
Dynamic
- thedataObject
.
Dynamic getData() { return data; }
Code void onRegister() #
Code void setData(dataObject) #
Set the dataObject.
- Param
Dynamic
- the dataObject this IProxy will tend.
void setData( Dynamic dataObject ) { data = dataObject; }