1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package gnu.hylafax.job;
25
26 /***
27 * This class is a convenience class implementing both a SendNotifier and
28 * ReceiveNotifier.
29 *
30 * @author $Author: sjardine $
31 * @version $Id: SendAndReceiveNotifier.java,v 1.3 2006/02/20 04:52:10 sjardine
32 * Exp $
33 * @see gnu.hylafax.job.SendListener
34 * @see gnu.hylafax.job.ReceiveListener
35 * @see gnu.hylafax.job.SendEvent
36 * @see gnu.hylafax.job.ReceiveEvent
37 */
38 public class SendAndReceiveNotifier extends BasicSendNotifier implements
39 ReceiveNotifier {
40 private BasicReceiveNotifier rn;
41
42 public SendAndReceiveNotifier() {
43 super();
44 rn = new BasicReceiveNotifier();
45 }
46
47 /***
48 * This method is called when Job state changes.
49 */
50 public void notifyReceiveListeners(ReceiveEvent details) {
51 rn.notifyReceiveListeners(details);
52 }
53
54 /***
55 * This method is called to register a Job Listener.
56 */
57 public void addReceiveListener(ReceiveListener l) {
58 rn.addReceiveListener(l);
59 }
60
61 /***
62 * This method is used to deregister a Job Listener.
63 */
64 public void removeReceiveListener(ReceiveListener l) {
65 rn.removeReceiveListener(l);
66 }
67
68 }
69