Package org.puremvc.java.patterns.proxy
Class Proxy
java.lang.Object
org.puremvc.java.patterns.observer.Notifier
org.puremvc.java.patterns.proxy.Proxy
public class Proxy extends Notifier implements 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
- 
Field Summary
 - 
Constructor Summary
 - 
Method Summary
Modifier and Type Method Description java.lang.ObjectgetData()Get the data objectjava.lang.StringgetProxyName()Get the proxy namevoidonRegister()Called by the Model when the Proxy is registeredvoidonRemove()Called by the Model when the Proxy is removedvoidsetData(java.lang.Object data)Set the data objectMethods inherited from class org.puremvc.java.patterns.observer.Notifier
sendNotification, sendNotification, sendNotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.puremvc.java.interfaces.INotifier
sendNotification, sendNotification, sendNotification 
- 
Field Details
- 
NAME
public static final java.lang.String NAME- See Also:
 - Constant Field Values
 
 - 
proxyName
protected java.lang.String proxyName - 
data
protected java.lang.Object data 
 - 
 - 
Constructor Details
 - 
Method Details
- 
onRegister
public void onRegister()Called by the Model when the Proxy is registered
- Specified by:
 onRegisterin interfaceIProxy
 - 
onRemove
public void onRemove()Called by the Model when the Proxy is removed
 - 
getProxyName
public java.lang.String getProxyName()Get the proxy name
- Specified by:
 getProxyNamein interfaceIProxy- Returns:
 - the proxy name
 
 - 
getData
public java.lang.Object getData()Get the data object
 - 
setData
public void setData(java.lang.Object data)Set the data object
 
 -