1c77b178579f4adddd7724a5a0a75c350d07ea9c
[jSite2.git] / src / net / pterodactylus / util / fcp / WatchGlobal.java
1 /**
2  * © 2008 INA Service GmbH
3  */
4 package net.pterodactylus.util.fcp;
5
6 /**
7  * The “WatchGlobal” messages enables clients to watch the global queue in
8  * addition to the client-local queue.
9  * 
10  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
11  * @version $Id$
12  */
13 public class WatchGlobal extends FcpMessage {
14
15         /**
16          * Enables or disables watching the global queue.
17          * 
18          * @param enabled
19          *            <code>true</code> to watch the global queue and the
20          *            client-local queue, <code>false</code> to watch only the
21          *            client-local queue
22          */
23         public WatchGlobal(boolean enabled) {
24                 this(enabled, Verbosity.ALL);
25         }
26
27         /**
28          * Enables or disables watching the global queue, optionally masking out
29          * certain events.
30          * 
31          * @param enabled
32          *            <code>true</code> to watch the global queue and the
33          *            client-local queue, <code>false</code> to watch only the
34          *            client-local queue
35          * @param verbosityMask
36          *            A verbosity mask that determines which events are received
37          */
38         public WatchGlobal(boolean enabled, Verbosity verbosityMask) {
39                 super("WatchGlobal");
40                 setField("Enabled", String.valueOf(enabled));
41                 setField("VerbosityMask", String.valueOf(verbosityMask));
42         }
43
44 }