1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.jboss.netty.handler.codec.rtsp;
17
18 import org.jboss.netty.handler.codec.http.HttpResponseStatus;
19
20
21
22
23
24 public final class RtspResponseStatuses {
25
26
27
28
29 public static final HttpResponseStatus CONTINUE = HttpResponseStatus.CONTINUE;
30
31
32
33
34 public static final HttpResponseStatus OK = HttpResponseStatus.OK;
35
36
37
38
39 public static final HttpResponseStatus CREATED = HttpResponseStatus.CREATED;
40
41
42
43
44 public static final HttpResponseStatus LOW_STORAGE_SPACE = new HttpResponseStatus(
45 250, "Low on Storage Space");
46
47
48
49
50 public static final HttpResponseStatus MULTIPLE_CHOICES = HttpResponseStatus.MULTIPLE_CHOICES;
51
52
53
54
55 public static final HttpResponseStatus MOVED_PERMANENTLY = HttpResponseStatus.MOVED_PERMANENTLY;
56
57
58
59
60 public static final HttpResponseStatus MOVED_TEMPORARILY = new HttpResponseStatus(
61 302, "Moved Temporarily");
62
63
64
65 public static final HttpResponseStatus NOT_MODIFIED = HttpResponseStatus.NOT_MODIFIED;
66
67
68
69
70 public static final HttpResponseStatus USE_PROXY = HttpResponseStatus.USE_PROXY;
71
72
73
74
75 public static final HttpResponseStatus BAD_REQUEST = HttpResponseStatus.BAD_REQUEST;
76
77
78
79
80 public static final HttpResponseStatus UNAUTHORIZED = HttpResponseStatus.UNAUTHORIZED;
81
82
83
84
85 public static final HttpResponseStatus PAYMENT_REQUIRED = HttpResponseStatus.PAYMENT_REQUIRED;
86
87
88
89
90 public static final HttpResponseStatus FORBIDDEN = HttpResponseStatus.FORBIDDEN;
91
92
93
94
95 public static final HttpResponseStatus NOT_FOUND = HttpResponseStatus.NOT_FOUND;
96
97
98
99
100 public static final HttpResponseStatus METHOD_NOT_ALLOWED = HttpResponseStatus.METHOD_NOT_ALLOWED;
101
102
103
104
105 public static final HttpResponseStatus NOT_ACCEPTABLE = HttpResponseStatus.NOT_ACCEPTABLE;
106
107
108
109
110 public static final HttpResponseStatus PROXY_AUTHENTICATION_REQUIRED =
111 HttpResponseStatus.PROXY_AUTHENTICATION_REQUIRED;
112
113
114
115
116 public static final HttpResponseStatus REQUEST_TIMEOUT = HttpResponseStatus.REQUEST_TIMEOUT;
117
118
119
120
121 public static final HttpResponseStatus GONE = HttpResponseStatus.GONE;
122
123
124
125
126 public static final HttpResponseStatus LENGTH_REQUIRED = HttpResponseStatus.LENGTH_REQUIRED;
127
128
129
130
131 public static final HttpResponseStatus PRECONDITION_FAILED = HttpResponseStatus.PRECONDITION_FAILED;
132
133
134
135
136 public static final HttpResponseStatus REQUEST_ENTITY_TOO_LARGE = HttpResponseStatus.REQUEST_ENTITY_TOO_LARGE;
137
138
139
140
141 public static final HttpResponseStatus REQUEST_URI_TOO_LONG = HttpResponseStatus.REQUEST_URI_TOO_LONG;
142
143
144
145
146 public static final HttpResponseStatus UNSUPPORTED_MEDIA_TYPE = HttpResponseStatus.UNSUPPORTED_MEDIA_TYPE;
147
148
149
150
151 public static final HttpResponseStatus PARAMETER_NOT_UNDERSTOOD = new HttpResponseStatus(
152 451, "Parameter Not Understood");
153
154
155
156
157 public static final HttpResponseStatus CONFERENCE_NOT_FOUND = new HttpResponseStatus(
158 452, "Conference Not Found");
159
160
161
162
163 public static final HttpResponseStatus NOT_ENOUGH_BANDWIDTH = new HttpResponseStatus(
164 453, "Not Enough Bandwidth");
165
166
167
168
169 public static final HttpResponseStatus SESSION_NOT_FOUND = new HttpResponseStatus(
170 454, "Session Not Found");
171
172
173
174
175 public static final HttpResponseStatus METHOD_NOT_VALID = new HttpResponseStatus(
176 455, "Method Not Valid in This State");
177
178
179
180
181 public static final HttpResponseStatus HEADER_FIELD_NOT_VALID = new HttpResponseStatus(
182 456, "Header Field Not Valid for Resource");
183
184
185
186
187 public static final HttpResponseStatus INVALID_RANGE = new HttpResponseStatus(
188 457, "Invalid Range");
189
190
191
192
193 public static final HttpResponseStatus PARAMETER_IS_READONLY = new HttpResponseStatus(
194 458, "Parameter Is Read-Only");
195
196
197
198
199 public static final HttpResponseStatus AGGREGATE_OPERATION_NOT_ALLOWED = new HttpResponseStatus(
200 459, "Aggregate operation not allowed");
201
202
203
204
205 public static final HttpResponseStatus ONLY_AGGREGATE_OPERATION_ALLOWED = new HttpResponseStatus(
206 460, "Only Aggregate operation allowed");
207
208
209
210
211 public static final HttpResponseStatus UNSUPPORTED_TRANSPORT = new HttpResponseStatus(
212 461, "Unsupported transport");
213
214
215
216
217 public static final HttpResponseStatus DESTINATION_UNREACHABLE = new HttpResponseStatus(
218 462, "Destination unreachable");
219
220
221
222
223 public static final HttpResponseStatus KEY_MANAGEMENT_FAILURE = new HttpResponseStatus(
224 463, "Key management failure");
225
226
227
228
229 public static final HttpResponseStatus INTERNAL_SERVER_ERROR = HttpResponseStatus.INTERNAL_SERVER_ERROR;
230
231
232
233
234 public static final HttpResponseStatus NOT_IMPLEMENTED = HttpResponseStatus.NOT_IMPLEMENTED;
235
236
237
238
239 public static final HttpResponseStatus BAD_GATEWAY = HttpResponseStatus.BAD_GATEWAY;
240
241
242
243
244 public static final HttpResponseStatus SERVICE_UNAVAILABLE = HttpResponseStatus.SERVICE_UNAVAILABLE;
245
246
247
248
249 public static final HttpResponseStatus GATEWAY_TIMEOUT = HttpResponseStatus.GATEWAY_TIMEOUT;
250
251
252
253
254 public static final HttpResponseStatus RTSP_VERSION_NOT_SUPPORTED = new HttpResponseStatus(
255 505, "RTSP Version not supported");
256
257
258
259
260 public static final HttpResponseStatus OPTION_NOT_SUPPORTED = new HttpResponseStatus(
261 551, "Option not supported");
262
263
264
265
266
267
268
269 public static HttpResponseStatus valueOf(int code) {
270 switch (code) {
271 case 250: return LOW_STORAGE_SPACE;
272 case 302: return MOVED_TEMPORARILY;
273 case 451: return PARAMETER_NOT_UNDERSTOOD;
274 case 452: return CONFERENCE_NOT_FOUND;
275 case 453: return NOT_ENOUGH_BANDWIDTH;
276 case 454: return SESSION_NOT_FOUND;
277 case 455: return METHOD_NOT_VALID;
278 case 456: return HEADER_FIELD_NOT_VALID;
279 case 457: return INVALID_RANGE;
280 case 458: return PARAMETER_IS_READONLY;
281 case 459: return AGGREGATE_OPERATION_NOT_ALLOWED;
282 case 460: return ONLY_AGGREGATE_OPERATION_ALLOWED;
283 case 461: return UNSUPPORTED_TRANSPORT;
284 case 462: return DESTINATION_UNREACHABLE;
285 case 463: return KEY_MANAGEMENT_FAILURE;
286 case 505: return RTSP_VERSION_NOT_SUPPORTED;
287 case 551: return OPTION_NOT_SUPPORTED;
288 default: return HttpResponseStatus.valueOf(code);
289 }
290 }
291
292 private RtspResponseStatuses() {
293 }
294 }