Update license to GPLv3, fix header comments
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / WatchGlobal.java
1 /*
2  * jFCPlib - WatchGlobal.java - Copyright © 2008–2016 David Roden
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 package net.pterodactylus.fcp;
19
20 /**
21  * The “WatchGlobal” messages enables clients to watch the global queue in
22  * addition to the client-local queue.
23  *
24  * @author David ‘Bombe’ Roden &lt;bombe@freenetproject.org&gt;
25  */
26 public class WatchGlobal extends FcpMessage {
27
28         /**
29          * Enables or disables watching the global queue.
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          */
36         public WatchGlobal(boolean enabled) {
37                 this(enabled, Verbosity.ALL);
38         }
39
40         /**
41          * Enables or disables watching the global queue, optionally masking out
42          * certain events.
43          *
44          * @param enabled
45          *            <code>true</code> to watch the global queue and the
46          *            client-local queue, <code>false</code> to watch only the
47          *            client-local queue
48          * @param verbosityMask
49          *            A verbosity mask that determines which events are received
50          */
51         public WatchGlobal(boolean enabled, Verbosity verbosityMask) {
52                 super("WatchGlobal");
53                 setField("Enabled", String.valueOf(enabled));
54                 setField("VerbosityMask", String.valueOf(verbosityMask));
55         }
56
57 }