From 609a784bd06a29955c54ff7a6ff5a83d58b0df93 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 12 Apr 2008 21:24:36 +0000 Subject: [PATCH] add GetRequestStatus git-svn-id: http://trooper/svn/projects/jSite/trunk@739 c3eda9e8-030b-0410-8277-bc7414b0a119 --- TODO | 1 - .../pterodactylus/util/fcp/GetRequestStatus.java | 66 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 src/net/pterodactylus/util/fcp/GetRequestStatus.java diff --git a/TODO b/TODO index 8c49a63..8fe6fe5 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,5 @@ ClientPutDiskDir GetPluginInfo (since 1075) -GetRequestStatus PutFetchable PutSuccessful RemovePersistentRequest diff --git a/src/net/pterodactylus/util/fcp/GetRequestStatus.java b/src/net/pterodactylus/util/fcp/GetRequestStatus.java new file mode 100644 index 0000000..5df1924 --- /dev/null +++ b/src/net/pterodactylus/util/fcp/GetRequestStatus.java @@ -0,0 +1,66 @@ +/* + * jSite2 - GetRequestStatus.java - + * Copyright © 2008 David Roden + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package net.pterodactylus.util.fcp; + +/** + * The “GetRequestStatus” message is used request status information about a + * running request. It is also the only way to trigger a download of a persisted + * completed {@link ClientGet} with a return type of {@link ReturnType#direct}. + * + * @author David ‘Bombe’ Roden <bombe@freenetproject.org> + * @version $Id$ + */ +public class GetRequestStatus extends FcpMessage { + + /** + * Creates a new “GetRequestStatus” message. + * + * @param identifier + * The identifier of the request + */ + public GetRequestStatus(String identifier) { + super("GetRequestStatus"); + setField("Identifier", identifier); + } + + /** + * Sets whether the request is on the global queue. + * + * @param global + * true if the request is on the global queue, + * false if it is on the client-local queue + */ + public void setGlobal(boolean global) { + setField("Global", String.valueOf(global)); + } + + /** + * Sets whether the omit the transmission of the request data in a + * {@link AllData} message. + * + * @param onlyData + * true to skip transmission of data, + * false to download data + */ + public void setOnlyData(boolean onlyData) { + setField("OnlyData", String.valueOf(onlyData)); + } + +} -- 2.7.4