mediator

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: 2 Imported by: 2

Documentation

Index

Constants

View Source
const NAME = "Mediator" // default name for the mediator

Variables

This section is empty.

Functions

This section is empty.

Types

type Mediator

type Mediator struct {
	facade.Notifier
	Name          string      // the mediator name
	ViewComponent interface{} // The view component
}

A base IMediator implementation.

func (*Mediator) GetMediatorName

func (self *Mediator) GetMediatorName() string

Get the name of the Mediator.

func (*Mediator) GetViewComponent

func (self *Mediator) GetViewComponent() interface{}

Get the IMediator's view component.

func (*Mediator) HandleNotification

func (self *Mediator) HandleNotification(notification interfaces.INotification)

Handle INotifications.

Typically this will be handled in a switch statement, with one 'case' entry per INotification the Mediator is interested in.

func (*Mediator) ListNotificationInterests

func (self *Mediator) ListNotificationInterests() []string

List the INotification names this Mediator is interested in being notified of.

- returns: Array the list of INotification names

func (*Mediator) OnRegister

func (self *Mediator) OnRegister()

Called by the View when the Mediator is registered

func (*Mediator) OnRemove

func (self *Mediator) OnRemove()

Called by the View when the Mediator is removed

func (*Mediator) SetViewComponent

func (self *Mediator) SetViewComponent(viewComponent interface{})

Set the IMediator's view component.

Jump to

Keyboard shortcuts

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