@@ -38,62 +38,62 @@ public final class RtspMethods { |
38 | 38 | * The DESCRIBE getMethod retrieves the description of a presentation or |
39 | 39 | * media object identified by the request URL from a server. |
40 | 40 | */ |
41 | | - public static final HttpMethod DESCRIBE = new HttpMethod("DESCRIBE"); |
| 41 | + public static final HttpMethod DESCRIBE = HttpMethod.valueOf("DESCRIBE"); |
42 | 42 |
|
43 | 43 | /** |
44 | 44 | * The ANNOUNCE posts the description of a presentation or media object |
45 | 45 | * identified by the request URL to a server, or updates the client-side |
46 | 46 | * session description in real-time. |
47 | 47 | */ |
48 | | - public static final HttpMethod ANNOUNCE = new HttpMethod("ANNOUNCE"); |
| 48 | + public static final HttpMethod ANNOUNCE = HttpMethod.valueOf("ANNOUNCE"); |
49 | 49 |
|
50 | 50 | /** |
51 | 51 | * The SETUP request for a URI specifies the transport mechanism to be |
52 | 52 | * used for the streamed media. |
53 | 53 | */ |
54 | | - public static final HttpMethod SETUP = new HttpMethod("SETUP"); |
| 54 | + public static final HttpMethod SETUP = HttpMethod.valueOf("SETUP"); |
55 | 55 |
|
56 | 56 | /** |
57 | 57 | * The PLAY getMethod tells the server to start sending data via the |
58 | 58 | * mechanism specified in SETUP. |
59 | 59 | */ |
60 | | - public static final HttpMethod PLAY = new HttpMethod("PLAY"); |
| 60 | + public static final HttpMethod PLAY = HttpMethod.valueOf("PLAY"); |
61 | 61 |
|
62 | 62 | /** |
63 | 63 | * The PAUSE request causes the stream delivery to be interrupted |
64 | 64 | * (halted) temporarily. |
65 | 65 | */ |
66 | | - public static final HttpMethod PAUSE = new HttpMethod("PAUSE"); |
| 66 | + public static final HttpMethod PAUSE = HttpMethod.valueOf("PAUSE"); |
67 | 67 |
|
68 | 68 | /** |
69 | 69 | * The TEARDOWN request stops the stream delivery for the given URI, |
70 | 70 | * freeing the resources associated with it. |
71 | 71 | */ |
72 | | - public static final HttpMethod TEARDOWN = new HttpMethod("TEARDOWN"); |
| 72 | + public static final HttpMethod TEARDOWN = HttpMethod.valueOf("TEARDOWN"); |
73 | 73 |
|
74 | 74 | /** |
75 | 75 | * The GET_PARAMETER request retrieves the value of a parameter of a |
76 | 76 | * presentation or stream specified in the URI. |
77 | 77 | */ |
78 | | - public static final HttpMethod GET_PARAMETER = new HttpMethod("GET_PARAMETER"); |
| 78 | + public static final HttpMethod GET_PARAMETER = HttpMethod.valueOf("GET_PARAMETER"); |
79 | 79 |
|
80 | 80 | /** |
81 | 81 | * The SET_PARAMETER requests to set the value of a parameter for a |
82 | 82 | * presentation or stream specified by the URI. |
83 | 83 | */ |
84 | | - public static final HttpMethod SET_PARAMETER = new HttpMethod("SET_PARAMETER"); |
| 84 | + public static final HttpMethod SET_PARAMETER = HttpMethod.valueOf("SET_PARAMETER"); |
85 | 85 |
|
86 | 86 | /** |
87 | 87 | * The REDIRECT request informs the client that it must connect to another |
88 | 88 | * server location. |
89 | 89 | */ |
90 | | - public static final HttpMethod REDIRECT = new HttpMethod("REDIRECT"); |
| 90 | + public static final HttpMethod REDIRECT = HttpMethod.valueOf("REDIRECT"); |
91 | 91 |
|
92 | 92 | /** |
93 | 93 | * The RECORD getMethod initiates recording a range of media data according to |
94 | 94 | * the presentation description. |
95 | 95 | */ |
96 | | - public static final HttpMethod RECORD = new HttpMethod("RECORD"); |
| 96 | + public static final HttpMethod RECORD = HttpMethod.valueOf("RECORD"); |
97 | 97 |
|
98 | 98 | private static final Map<String, HttpMethod> methodMap = new HashMap<String, HttpMethod>(); |
99 | 99 |
|
@@ -130,7 +130,7 @@ public static HttpMethod valueOf(String name) { |
130 | 130 | if (result != null) { |
131 | 131 | return result; |
132 | 132 | } else { |
133 | | - return new HttpMethod(name); |
| 133 | + return HttpMethod.valueOf(name); |
134 | 134 | } |
135 | 135 | } |
136 | 136 |
|
|