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