9785f5b2981e86ddeae2f5da7a6323df4f897c08
[jFCPlib.git] / src / net / pterodactylus / fcp / highlevel / PeerResult.java
1 /*
2  * jFCPlib-high-level-client - PeerResult.java -
3  * Copyright © 2008 David Roden
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 package net.pterodactylus.fcp.highlevel;
21
22 import net.pterodactylus.fcp.Peer;
23
24 /**
25  * The peer result is the result of several operations:
26  * {@link HighLevelClient#addPeer(String)},
27  * {@link HighLevelClient#addPeer(java.net.URL)}, or
28  * {@link HighLevelClient#addPeer(net.pterodactylus.fcp.NodeRef)}.
29  * 
30  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
31  */
32 public class PeerResult extends HighLevelResult {
33
34         /** The peer. */
35         private Peer peer;
36
37         /**
38          * Package-private constructor.
39          * 
40          * @param identifier
41          *            The identifier of the request
42          */
43         PeerResult(String identifier) {
44                 super(identifier);
45         }
46
47         /**
48          * Returns the peer.
49          * 
50          * @return The peer
51          */
52         public Peer getPeer() {
53                 return peer;
54         }
55
56         /**
57          * Sets the peer.
58          * 
59          * @param peer
60          *            The peer
61          */
62         void setPeer(Peer peer) {
63                 this.peer = peer;
64         }
65
66 }