puremvc.patterns.mediator package

Submodules

puremvc.patterns.mediator.Mediator module

class puremvc.patterns.mediator.Mediator.Mediator(mediator_name: str | None = None, view_component: Any | None = None)

Bases: Notifier, IMediator

A base IMediator implementation.

See Also

puremvc.core.View

NAME = 'Mediator'
handle_notification(notification: INotification) None

Handle INotification.

Typically, this will be handled in an if/else statement, with one ‘comparison’ entry per INotification the Mediator is interested in.

Parameters:

notification (INotification) – The notification to be handled.

Returns:

None

list_notification_interests() List[str]

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

Returns:

List the list of INotification names

Return type:

List[str]

property mediator_name: str

Get the name of the Mediator.

Returns:

The name of the mediator.

Return type:

str

on_register() None

Called by the View when the Mediator is registered :return: None

on_remove() None

Called by the View when the Mediator is removed :return: None

property view_component: Any

Get the Mediator view component.

Returns:

The view component.

Return type:

Any

Module contents