current state
[jSite2.git] / src / net / pterodactylus / util / fcp / client / FcpNodeInformation.java
1 /*
2  * jSite2 - FcpNodeInformation.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.util.fcp.client;
21
22 /**
23  * Container for node information. This information is transmitted to the client
24  * in the “NodeHello” response.
25  * 
26  * @author David Roden <droden@gmail.com>
27  * @version $Id$
28  */
29 public class FcpNodeInformation {
30
31         /** The “FCPVersion” field. */
32         private final String fcpVersion;
33
34         /** The “Version” field. */
35         private final String version;
36
37         /** The “Node” field. */
38         private final String node;
39
40         /** The “Testnet” field. */
41         private final boolean testnet;
42
43         /** The “CompressionCodecs” field. */
44         private final int compressionCodecs;
45
46         /** The “ConnectionIdentifier” field. */
47         private final String connectionIdentifier;
48
49         /** The “NodeLanguage” field. */
50         private final String nodeLanguage;
51
52         /**
53          * Creates a new node information object.
54          * 
55          * @param fcpVersion
56          *            The “FCPVersion” field
57          * @param version
58          *            The “Version” field
59          * @param node
60          *            The “Node” field
61          * @param testnet
62          *            The “Testnet” field
63          * @param compressionCodecs
64          *            The “CompressionCodecs” field
65          * @param connectionIdentifier
66          *            The “ConnectionIdentifier” field
67          * @param nodeLanguage
68          *            The “NodeLanguage” field
69          */
70         public FcpNodeInformation(String fcpVersion, String version, String node, boolean testnet, int compressionCodecs, String connectionIdentifier, String nodeLanguage) {
71                 this.fcpVersion = fcpVersion;
72                 this.version = version;
73                 this.node = node;
74                 this.testnet = testnet;
75                 this.compressionCodecs = compressionCodecs;
76                 this.connectionIdentifier = connectionIdentifier;
77                 this.nodeLanguage = nodeLanguage;
78         }
79
80         /**
81          * Returns the “FCPVersion” field.
82          * 
83          * @return The “FCPVersion” field
84          */
85         public String getFcpVersion() {
86                 return fcpVersion;
87         }
88
89         /**
90          * Returns the “Version” field.
91          * 
92          * @return The “Version” field
93          */
94         public String getVersion() {
95                 return version;
96         }
97
98         /**
99          * Returns the “Node” field.
100          * 
101          * @return The “Node” field
102          */
103         public String getNode() {
104                 return node;
105         }
106
107         /**
108          * Returns the “Testnet” field.
109          * 
110          * @return The “Testnet” field
111          */
112         public boolean isTestnet() {
113                 return testnet;
114         }
115
116         /**
117          * Returns the “CompressionCodecs” field.
118          * 
119          * @return The “CompressionCodecs” field
120          */
121         public int getCompressionCodecs() {
122                 return compressionCodecs;
123         }
124
125         /**
126          * Returns the “ConnectionIdentifier” field.
127          * 
128          * @return The “ConnectionIdentifier” field
129          */
130         public String getConnectionIdentifier() {
131                 return connectionIdentifier;
132         }
133
134         /**
135          * Returns the “NodeLanguage” field.
136          * 
137          * @return The “NodeLanguage” field
138          */
139         public String getNodeLanguage() {
140                 return nodeLanguage;
141         }
142
143 }