public void Run() { Logger.Trace("Run()"); for (int i = mediaList.eventListenerList.Count - 1; i >= 0; i--) { MediaListEventListener listener = mediaList.eventListenerList[i]; try { mediaListEvent.Notify(listener); } catch (Exception t) { Logger.Warn("Event listener {} threw an exception", t, listener); // Continue with the next listener... } } Logger.Trace("runnable exits"); }
public override void Notify(MediaListEventListener listener) { listener.MediaListItemDeleted(mediaList, mediaInstance, index); }
public override void Notify(MediaListEventListener listener) { listener.MediaListWillAddItem(mediaList, mediaInstance, index); }
/** * Remove a component previously added so that it no longer receives media * list events. * * @param listener component to remove */ public void RemoveListEventListener(MediaListEventListener listener) { Logger.Debug("RemoveMediaListEventListener(listener={})", listener); eventListenerList.Remove(listener); }
public abstract void Notify(MediaListEventListener listener);
/** * Add a component to be notified of media list events. * * @param listener component to add */ public void AddMediaListEventListener(MediaListEventListener listener) { Logger.Debug("AddMediaListEventListener(listener={})", listener); eventListenerList.Add(listener); }