|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.puremvc.java.patterns.observer.Notifier
org.puremvc.java.patterns.proxy.Proxy
public class Proxy
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.
Model| Field Summary | |
|---|---|
protected java.lang.Object |
data
|
protected java.lang.String |
proxyName
|
| Fields inherited from class org.puremvc.java.patterns.observer.Notifier |
|---|
facade |
| Constructor Summary | |
|---|---|
Proxy(java.lang.String proxyName)
Constructor |
|
Proxy(java.lang.String proxyName,
java.lang.Object data)
Constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
getData()
Get the data object |
java.lang.String |
getProxyName()
Get the proxy name |
void |
onRegister()
Called by the Model when the Proxy is registered |
void |
onRemove()
Called by the Model when the Proxy is removed |
void |
setData(java.lang.Object data)
Set the data object |
| Methods inherited from class org.puremvc.java.patterns.observer.Notifier |
|---|
sendNotification, sendNotification, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.puremvc.java.interfaces.INotifier |
|---|
sendNotification, sendNotification, sendNotification |
| Field Detail |
|---|
protected java.lang.String proxyName
protected java.lang.Object data
| Constructor Detail |
|---|
public Proxy(java.lang.String proxyName,
java.lang.Object data)
proxyName - data - public Proxy(java.lang.String proxyName)
proxyName - Name of the Proxy| Method Detail |
|---|
public java.lang.String getProxyName()
getProxyName in interface IProxypublic void setData(java.lang.Object data)
setData in interface IProxydata - public java.lang.Object getData()
getData in interface IProxypublic void onRegister()
onRegister in interface IProxypublic void onRemove()
onRemove in interface IProxy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||