Package org.puremvc.java.interfaces
Interface IProxy
- All Superinterfaces:
INotifier
- All Known Implementing Classes:
Proxy
public interface IProxy extends INotifier
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
calledNAME
, if they are not instantiated multiple times. - Encapsulate interaction with local or remote services used to fetch and persist model data.
-
Method Summary
Modifier and Type Method Description java.lang.Object
getData()
Get the data objectjava.lang.String
getProxyName()
Get the Proxy namevoid
onRegister()
Called by the Model when the Proxy is registeredvoid
onRemove()
Called by the Model when the Proxy is removedvoid
setData(java.lang.Object data)
Set the data objectMethods inherited from interface org.puremvc.java.interfaces.INotifier
sendNotification, sendNotification, sendNotification
-
Method Details
-
getProxyName
java.lang.String getProxyName()Get the Proxy name
- Returns:
- the Proxy instance name
-
setData
void setData(java.lang.Object data)Set the data object
- Parameters:
data
- the data object
-
getData
java.lang.Object getData()Get the data object
- Returns:
- the data as type Object
-
onRegister
void onRegister()Called by the Model when the Proxy is registered
-
onRemove
void onRemove()Called by the Model when the Proxy is removed
-