mediator

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 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
}

Mediator A base IMediator implementation.

func (*Mediator) GetMediatorName

func (self *Mediator) GetMediatorName() string

GetMediatorName Get the name of the Mediator.

func (*Mediator) GetViewComponent

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

GetViewComponent Get the IMediator's view component.

func (*Mediator) HandleNotification

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

HandleNotification 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

ListNotificationInterests 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()

OnRegister Called by the View when the Mediator is registered

func (*Mediator) OnRemove

func (self *Mediator) OnRemove()

OnRemove Called by the View when the Mediator is removed

func (*Mediator) SetViewComponent

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

SetViewComponent Set the IMediator's view component.

Jump to

Keyboard shortcuts

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