Namespace: PureMVC.Interfaces.IMediator
Interface IMediator
All Known Implementing Classes: - TMediator
public interface IMediator
Persistent- False
remarks- In PureMVC, IMediator implementors assume these responsibilities:Implement a common method which returns a list of all INotifications the IMediator has interest in.Implement a common notification (callback) methodAdditionally, IMediators typically:Act as an intermediary between one or more view components such as text boxes or list controls, maintaining references and coordinating their behavior.In Flash-based apps, this is often the place where event listeners are added to view components, and their handlers implementedRespond to and generate INotifications, interacting with of the rest of the PureMVC appWhen an IMediator is registered with the IView, the IView will call the IMediator's listNotificationInterests method. The IMediator will return an IList of INotification names which it wishes to be notified aboutThe IView will then create an Observer object encapsulating that IMediator's (handleNotification) method and register it as an Observer for each INotification name returned by listNotificationInterests
summary- The interface definition for a PureMVC Mediator.
MediatorName
public MediatorName: string
Type- string
Access- read
ViewComponent
public ViewComponent: TObject
Type- TObject
Access- read/write
GetMediatorName
public function GetMediatorName(): string
Reintroduce- False
Returns- string
summary- Tthe IMediator instance name
GetViewComponent
public function GetViewComponent(): TObject
Reintroduce- False
Returns- TObject
summary- The IMediator's view component
HandleNotification
public procedure HandleNotification(Notification: PureMVC.Interfaces.INotification.INotification )
Reintroduce- False
summary- Handle an INotification
param- The INotification to be handled
ListNotificationInterests
public function ListNotificationInterests(): IList<string>
Reintroduce- False
Returns- IList<string>
summary- List INotification interests
returns- An IList of the INotification names this IMediator has an interest in
OnRegister
public procedure OnRegister()
Reintroduce- False
summary- Called by the View when the Mediator is registered
OnRemove
public procedure OnRemove()
Reintroduce- False
summary- Called by the View when the Mediator is removed
SetViewComponent
public procedure SetViewComponent(Value: TObject)
Reintroduce- False