1 /* 2 * Copyright the original author or authors. 3 * 4 * Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.mozilla.org/MPL/MPL-1.1.html 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 import org.as2lib.env.event.EventListenerSource; 18 import org.as2lib.env.event.broadcaster.EventInfo; 19 20 /** 21 * {@code EventBroadcaster} dispatches events to all added listeners with the help 22 * of an {@link EventInfo}. 23 * 24 * @author Martin Heidegger 25 * @author Simon Wacker 26 */ 27 interface org.as2lib.env.event.broadcaster.EventBroadcaster extends EventListenerSource { 28 29 /** 30 * Dispatches the passed-in {@code event} to all added listeners. 31 * 32 * <p>The name returned by the {@link EventInfo#getName} method of the passed-in 33 * {@code event} is used as event method name to invoke on the listeners. 34 * 35 * <p>The passed-in {@code event} is also passed as parameter to the listeners' 36 * event methods. 37 * 38 * @param event the event to dispatch to all listeners 39 * @throws EventExecutionException if a listener threw an exception during 40 * dispatching 41 */ 42 public function dispatch(event:EventInfo):Void; 43 44 }