current state
[jSite2.git] / src / net / pterodactylus / util / fcp / FcpProtocolException.java
1 /*
2  * jSite2 - FcpProtocolException.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;
21
22 /**
23  * TODO
24  * 
25  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
26  * @version $Id$
27  */
28 public class FcpProtocolException extends FcpException {
29
30         private final int code;
31         private final boolean fatal;
32         private final boolean global;
33
34         private String codeDescription;
35         private String extraDescription;
36         private String identifier;
37
38         public FcpProtocolException(int code, boolean fatal, boolean global) {
39                 this.code = code;
40                 this.fatal = fatal;
41                 this.global = global;
42         }
43
44         /**
45          * TODO
46          * 
47          * @return the code
48          */
49         int getCode() {
50                 return code;
51         }
52
53         /**
54          * TODO
55          * 
56          * @return the fatal
57          */
58         boolean isFatal() {
59                 return fatal;
60         }
61
62         /**
63          * TODO
64          * 
65          * @return the global
66          */
67         boolean isGlobal() {
68                 return global;
69         }
70
71         /**
72          * TODO
73          * 
74          * @return the codeDescription
75          */
76         String getCodeDescription() {
77                 return codeDescription;
78         }
79
80         /**
81          * TODO
82          * 
83          * @param codeDescription
84          *            the codeDescription to set
85          */
86         void setCodeDescription(String codeDescription) {
87                 this.codeDescription = codeDescription;
88         }
89
90         /**
91          * TODO
92          * 
93          * @return the extraDescription
94          */
95         String getExtraDescription() {
96                 return extraDescription;
97         }
98
99         /**
100          * TODO
101          * 
102          * @param extraDescription
103          *            the extraDescription to set
104          */
105         void setExtraDescription(String extraDescription) {
106                 this.extraDescription = extraDescription;
107         }
108
109         /**
110          * TODO
111          * 
112          * @return the identifier
113          */
114         String getIdentifier() {
115                 return identifier;
116         }
117
118         /**
119          * TODO
120          * 
121          * @param identifier
122          *            the identifier to set
123          */
124         void setIdentifier(String identifier) {
125                 this.identifier = identifier;
126         }
127
128 }