2 * jFCPlib - SentFeed.java - Copyright © 2009 David Roden
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 package net.pterodactylus.fcp;
22 * The “SentFeed” message signals that a feed was successfully sent to a peer.
24 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
26 public class SentFeed extends BaseMessage {
29 * Creates a new “SentFeed” message from the given FCP message.
32 * The FCP message containing the “SentFeed” message
34 public SentFeed(FcpMessage fcpMessage) {
39 * Returns the identifier of the sent feed. The identifier of this message
40 * matches the identifier that was given when a {@link SendBookmarkFeed},
41 * {@link SendDownloadFeed}, or {@link SendTextFeed} command was created.
43 * @return The send feed’s identifier
45 public String getIdentifier() {
46 return getField("Identifier");
50 * Returns the node status of the peer. The node status is definied in
51 * {@code freenet.node.PeerManager}.
56 * <li>Version too new</li>
57 * <li>Version too old</li>
58 * <li>Disconnected</li>
59 * <li>Never connected</li>
63 * <li>Listening only</li>
64 * <li>Clock problem</li>
65 * <li>Connection error</li>
66 * <li>Disconnecting</li>
67 * <li>Routing disabled</li>
70 * @return The node’s status
72 public int getNodeStatus() {
73 return FcpUtils.safeParseInt(getField("NodeStatus"));