From: David ‘Bombe’ Roden Date: Thu, 10 Apr 2008 11:24:51 +0000 (+0000) Subject: add ListPersistentRequests and WatchGlobal command X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=02b10d6be186d790c6beefb3f8e30f3ec14d007d;p=jSite2.git add ListPersistentRequests and WatchGlobal command git-svn-id: http://trooper/svn/projects/jSite/trunk@690 c3eda9e8-030b-0410-8277-bc7414b0a119 --- diff --git a/src/net/pterodactylus/util/fcp/ListPersistentRequests.java b/src/net/pterodactylus/util/fcp/ListPersistentRequests.java new file mode 100644 index 0000000..4e72a2c --- /dev/null +++ b/src/net/pterodactylus/util/fcp/ListPersistentRequests.java @@ -0,0 +1,24 @@ +/** + * © 2008 INA Service GmbH + */ +package net.pterodactylus.util.fcp; + +/** + * Command to tell the node to list all persistent requests from the current + * queue, which is either the global queue or the client-local queue, depending + * on your {@link WatchGlobal} status. + * + * @author David Roden + * @version $Id$ + */ +public class ListPersistentRequests extends FcpMessage { + + /** + * Creates a new “ListPersistentRequests” command that lists all persistent + * requests in the current queue. + */ + public ListPersistentRequests() { + super("ListPersistentRequests"); + } + +} diff --git a/src/net/pterodactylus/util/fcp/WatchGlobal.java b/src/net/pterodactylus/util/fcp/WatchGlobal.java new file mode 100644 index 0000000..79698c5 --- /dev/null +++ b/src/net/pterodactylus/util/fcp/WatchGlobal.java @@ -0,0 +1,44 @@ +/** + * © 2008 INA Service GmbH + */ +package net.pterodactylus.util.fcp; + +/** + * The “WatchGlobal” messages enables clients to watch the global queue in + * addition to the client-local queue. + * + * @author David Roden + * @version $Id$ + */ +public class WatchGlobal extends FcpMessage { + + /** + * Enables or disables watching the global queue. + * + * @param enabled + * true to watch the global queue and the + * client-local queue, false to watch only the + * client-local queue + */ + public WatchGlobal(boolean enabled) { + this(enabled, Verbosity.ALL); + } + + /** + * Enables or disables watching the global queue, optionally masking out + * certain events. + * + * @param enabled + * true to watch the global queue and the + * client-local queue, false to watch only the + * client-local queue + * @param verbosityMask + * A verbosity mask that determines which events are received + */ + public WatchGlobal(boolean enabled, Verbosity verbosityMask) { + super("WatchGlobal"); + setField("Enabled", String.valueOf(enabled)); + setField("VerbosityMask", String.valueOf(verbosityMask)); + } + +}