proxy

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2019 License: BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const NAME = "Proxy" // default name for the proxy

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy struct {
	facade.Notifier
	Name string      // the proxy name
	Data interface{} // the data object
}

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.

func (*Proxy) GetData

func (self *Proxy) GetData() interface{}

Get the data object

func (*Proxy) GetProxyName

func (self *Proxy) GetProxyName() string

Get the proxy name

func (*Proxy) OnRegister

func (self *Proxy) OnRegister()

Called by the Model when the Proxy is registered

func (*Proxy) OnRemove

func (self *Proxy) OnRemove()

Called by the Model when the Proxy is removed

func (*Proxy) SetData

func (self *Proxy) SetData(data interface{})

Set the data object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL