2 * jSite2 - 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 a
23 * {@link ClientPut} (or {@link ClientPutDiskDir} or {@link ClientPutComplexDir})
26 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
28 public class URIGenerated extends BaseMessage {
31 * Creates a new “URIGenerated” message that wraps the received message.
33 * @param receivedMessage
34 * The received message
36 URIGenerated(FcpMessage receivedMessage) {
37 super(receivedMessage);
41 * Returns the identifier of the request that generated an URI.
43 * @return The identifier of the request
45 public String getIdentifier() {
46 return getField("Identifier");
50 * Returns the URI that was generated by the request.
52 * @return The URI that was generated by the request
54 public String getURI() {
55 return getField("URI");
59 * Returns whether the request that generated the URI is on the global queue
60 * or on the client-local queue.
62 * @return <code>true</code> if the request is on the global queue,
63 * <code>false</code> if it is on the client-local queue
65 public boolean isGlobal() {
66 return Boolean.parseBoolean(getField("Global"));