1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.asterisk.manager;
18
19 import net.sf.asterisk.manager.event.ManagerEvent;
20 import net.sf.asterisk.manager.response.ManagerResponse;
21
22 /***
23 * The Dispatcher defines the interface used for communication between
24 * ManagerConnection and ManagerReader.<br>
25 * Do not use this interface in your code, it is intended to be used only by the
26 * DefaultManagerConnection and its ManagerReader.
27 *
28 * @author srt
29 * @version $Id: Dispatcher.java,v 1.2 2005/10/25 22:49:56 srt Exp $
30 */
31 public interface Dispatcher
32 {
33 /***
34 * This method is called by the reader whenever a {@link ManagerResponse} is
35 * received. The response is dispatched to the associated
36 * {@link ManagerResponseHandler}.
37 *
38 * @param response the resonse received by the reader
39 * @see ManagerReader
40 */
41 void dispatchResponse(ManagerResponse response);
42
43 /***
44 * This method is called by the reader whenever a ManagerEvent is received.
45 * The event is dispatched to all registered ManagerEventHandlers.
46 *
47 * @param event the event received by the reader
48 * @see ManagerReader
49 */
50 void dispatchEvent(ManagerEvent event);
51 }