Package org.puremvc.java.multicore.interfaces

Examples of org.puremvc.java.multicore.interfaces.IMediator


   * @param mediatorName
   *             name of the <code>Mediator</code> instance to be removed.
   */
  public IMediator removeMediator(String mediatorName) {
    // Retrieve the named mediator
    IMediator mediator = mediatorMap.get(mediatorName);

    if(mediator != null) {
      // for every notification this mediator is interested in...
      String[] interests = mediator.listNotificationInterests();
      for (int i=0; i<interests.length; i++) {
        // remove the observer linking the mediator
        // to the notification interest
        removeObserver(interests[i], mediator);
      }

      // remove the mediator from the map
      mediatorMap.remove(mediatorName);

      // alert the mediator that it has been removed
      mediator.onRemove();
    }
    return mediator;
  }
View Full Code Here

TOP

Related Classes of org.puremvc.java.multicore.interfaces.IMediator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.