From 02b10d6be186d790c6beefb3f8e30f3ec14d007d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 10 Apr 2008 11:24:51 +0000 Subject: [PATCH] add ListPersistentRequests and WatchGlobal command git-svn-id: http://trooper/svn/projects/jSite/trunk@690 c3eda9e8-030b-0410-8277-bc7414b0a119 --- .../util/fcp/ListPersistentRequests.java | 24 ++++++++++++ src/net/pterodactylus/util/fcp/WatchGlobal.java | 44 ++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 src/net/pterodactylus/util/fcp/ListPersistentRequests.java create mode 100644 src/net/pterodactylus/util/fcp/WatchGlobal.java 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)); + } + +} -- 2.7.4