registerMediator method

void registerMediator(
  1. IMediator mediator
)
override

Register an IMediator instance with the IView.

Registers the IMediator so that it can be retrieved by name, and interrogates the IMediator for its INotification interests.

If the IMediator returns a list of INotification names to be notified about, an Observer is created encapsulating the IMediator instance's handleNotification method and registering it as an IObserver for all INotifications the IMediator is interested in.

  • Param mediator - a reference to the IMediator instance.

Implementation

void registerMediator(IMediator mediator) {
  if (view != null) view.registerMediator(mediator);
}