2 * jFCPlib - SentFeed.java - Copyright © 2009–2016 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 3 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, see <http://www.gnu.org/licenses/>.
18 package net.pterodactylus.fcp;
21 * The “SentFeed” message signals that a feed was successfully sent to a peer.
23 * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
25 public class SentFeed extends BaseMessage implements Identifiable {
28 * Creates a new “SentFeed” message from the given FCP message.
31 * The FCP message containing the “SentFeed” message
33 public SentFeed(FcpMessage fcpMessage) {
38 * Returns the identifier of the sent feed. The identifier of this message
39 * matches the identifier that was given when a {@link SendBookmarkFeed},
40 * {@link SendDownloadFeed}, or {@link SendTextFeed} command was created.
42 * @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"));