Add @Override annotations that are missing for JDK-1.6 compatibility.
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / SentFeed.java
1 /*
2  * jFCPlib - SentFeed.java - Copyright © 2009 David Roden
3  *
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.
8  *
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.
13  *
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.
17  */
18
19 package net.pterodactylus.fcp;
20
21 /**
22  * The “SentFeed” message signals that a feed was successfully sent to a peer.
23  *
24  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
25  */
26 public class SentFeed extends BaseMessage implements Identifiable {
27
28         /**
29          * Creates a new “SentFeed” message from the given FCP message.
30          *
31          * @param fcpMessage
32          *            The FCP message containing the “SentFeed” message
33          */
34         public SentFeed(FcpMessage fcpMessage) {
35                 super(fcpMessage);
36         }
37
38         /**
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.
42          *
43          * @return The send feed’s identifier
44          */
45         @Override
46         public String getIdentifier() {
47                 return getField("Identifier");
48         }
49
50         /**
51          * Returns the node status of the peer. The node status is definied in
52          * {@code freenet.node.PeerManager}.
53          * <p>
54          * <ol start="1">
55          * <li>Connected</li>
56          * <li>Backed off</li>
57          * <li>Version too new</li>
58          * <li>Version too old</li>
59          * <li>Disconnected</li>
60          * <li>Never connected</li>
61          * <li>Disabled</li>
62          * <li>Bursting</li>
63          * <li>Listening</li>
64          * <li>Listening only</li>
65          * <li>Clock problem</li>
66          * <li>Connection error</li>
67          * <li>Disconnecting</li>
68          * <li>Routing disabled</li>
69          * </ol>
70          *
71          * @return The node’s status
72          */
73         public int getNodeStatus() {
74                 return FcpUtils.safeParseInt(getField("NodeStatus"));
75         }
76
77 }