2 * jFCPlib - URIGenerated.java - Copyright © 2008 David Roden
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License as published by the Free Software
6 * Foundation; either version 2 of the License, or (at your option) any later
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307, USA.
19 package net.pterodactylus.fcp;
22 * The “URIGenerated” message signals the client that an URI was generated for
23 * a {@link ClientPut} (or {@link ClientPutDiskDir} or
24 * {@link ClientPutComplexDir} ) request.
26 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
28 public class URIGenerated extends BaseMessage implements Identifiable {
31 * Creates a new “URIGenerated” message that wraps the received message.
33 * @param receivedMessage
34 * The received message
36 public URIGenerated(FcpMessage receivedMessage) {
37 super(receivedMessage);
41 * Returns the identifier of the request that generated an URI.
43 * @return The identifier of the request
46 public String getIdentifier() {
47 return getField("Identifier");
51 * Returns the URI that was generated by the request.
53 * @return The URI that was generated by the request
55 public String getURI() {
56 return getField("URI");
60 * Returns whether the request that generated the URI is on the global
61 * queue or on the client-local queue.
63 * @return <code>true</code> if the request is on the global queue,
64 * <code>false</code> if it is on the client-local queue
66 public boolean isGlobal() {
67 return Boolean.parseBoolean(getField("Global"));