01: //========================================================================
02: //Copyright 2006 Mort Bay Consulting Pty. Ltd.
03: //------------------------------------------------------------------------
04: //Licensed under the Apache License, Version 2.0 (the "License");
05: //you may not use this file except in compliance with the License.
06: //You may obtain a copy of the License at
07: //http://www.apache.org/licenses/LICENSE-2.0
08: //Unless required by applicable law or agreed to in writing, software
09: //distributed under the License is distributed on an "AS IS" BASIS,
10: //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11: //See the License for the specific language governing permissions and
12: //limitations under the License.
13: //========================================================================
14:
15: package org.mortbay.jetty.ajp;
16:
17: import org.mortbay.io.Buffer;
18: import org.mortbay.io.BufferCache;
19:
20: /**
21: * @author Markus Kobler
22: */
23: public class Ajp13PacketMethods {
24:
25: // TODO - this can probably be replaced by HttpMethods or at least an
26: // extension of it.
27: // It is probably most efficient if "GET" ends up as the same instance
28:
29: public final static String OPTIONS = "OPTIONS", GET = "GET",
30: HEAD = "HEAD", POST = "POST", PUT = "PUT",
31: DELETE = "DELETE", TRACE = "TRACE", PROPFIND = "PROPFIND",
32: PROPPATCH = "PROPPATCH", MKCOL = "MKCOL", COPY = "COPY",
33: MOVE = "MOVE", LOCK = "LOCK", UNLOCK = "UNLOCK",
34: ACL = "ACL", REPORT = "REPORT",
35: VERSION_CONTROL = "VERSION-CONTROL", CHECKIN = "CHECKIN",
36: CHECKOUT = "CHECKOUT", UNCHCKOUT = "UNCHECKOUT",
37: SEARCH = "SEARCH", MKWORKSPACE = "MKWORKSPACE",
38: UPDATE = "UPDATE", LABEL = "LABEL", MERGE = "MERGE",
39: BASELINE_CONTROL = "BASELINE-CONTROL",
40: MKACTIVITY = "MKACTIVITY";
41:
42: public final static int OPTIONS_ORDINAL = 1, GET_ORDINAL = 2,
43: HEAD_ORDINAL = 3, POST__ORDINAL = 4, PUT_ORDINAL = 5,
44: DELETE_ORDINAL = 6, TRACE_ORDINAL = 7,
45: PROPFIND_ORDINAL = 8, PROPPATCH_ORDINAL = 9,
46: MKCOL_ORDINAL = 10, COPY_ORDINAL = 11, MOVE_ORDINAL = 12,
47: LOCK_ORDINAL = 13, UNLOCK_ORDINAL = 14, ACL_ORDINAL = 15,
48: REPORT_ORDINAL = 16, VERSION_CONTROL_ORDINAL = 17,
49: CHECKIN_ORDINAL = 18, CHECKOUT_ORDINAL = 19,
50: UNCHCKOUT_ORDINAL = 20, SEARCH_ORDINAL = 21,
51: MKWORKSPACE_ORDINAL = 22, UPDATE_ORDINAL = 23,
52: LABEL_ORDINAL = 24, MERGE_ORDINAL = 25,
53: BASELINE_CONTROL_ORDINAL = 26, MKACTIVITY_ORDINAL = 27;
54:
55: public final static BufferCache CACHE = new BufferCache();
56:
57: public final static Buffer OPTIONS_BUFFER = CACHE.add(OPTIONS,
58: OPTIONS_ORDINAL), GET_BUFFER = CACHE.add(GET, GET_ORDINAL),
59: HEAD_BUFFER = CACHE.add(HEAD, HEAD_ORDINAL),
60: POST__BUFFER = CACHE.add(POST, POST__ORDINAL),
61: PUT_BUFFER = CACHE.add(PUT, PUT_ORDINAL),
62: DELETE_BUFFER = CACHE.add(DELETE, DELETE_ORDINAL),
63: TRACE_BUFFER = CACHE.add(TRACE, TRACE_ORDINAL),
64: PROPFIND_BUFFER = CACHE.add(PROPFIND, PROPFIND_ORDINAL),
65: PROPPATCH_BUFFER = CACHE.add(PROPPATCH, PROPPATCH_ORDINAL),
66: MKCOL_BUFFER = CACHE.add(MKCOL, MKCOL_ORDINAL),
67: COPY_BUFFER = CACHE.add(COPY, COPY_ORDINAL),
68: MOVE_BUFFER = CACHE.add(MOVE, MOVE_ORDINAL),
69: LOCK_BUFFER = CACHE.add(LOCK, LOCK_ORDINAL),
70: UNLOCK_BUFFER = CACHE.add(UNLOCK, UNLOCK_ORDINAL),
71: ACL_BUFFER = CACHE.add(ACL, ACL_ORDINAL),
72: REPORT_BUFFER = CACHE.add(REPORT, REPORT_ORDINAL),
73: VERSION_CONTROL_BUFFER = CACHE.add(VERSION_CONTROL,
74: VERSION_CONTROL_ORDINAL), CHECKIN_BUFFER = CACHE
75: .add(CHECKIN, CHECKIN_ORDINAL),
76: CHECKOUT_BUFFER = CACHE.add(CHECKOUT, CHECKOUT_ORDINAL),
77: UNCHCKOUT_BUFFER = CACHE.add(UNCHCKOUT, UNCHCKOUT_ORDINAL),
78: SEARCH_BUFFER = CACHE.add(SEARCH, SEARCH_ORDINAL),
79: MKWORKSPACE_BUFFER = CACHE.add(MKWORKSPACE,
80: MKWORKSPACE_ORDINAL), UPDATE_BUFFER = CACHE.add(
81: UPDATE, UPDATE_ORDINAL), LABEL_BUFFER = CACHE.add(
82: LABEL, LABEL_ORDINAL), MERGE_BUFFER = CACHE.add(
83: MERGE, MERGE_ORDINAL),
84: BASELINE_CONTROL_BUFFER = CACHE.add(BASELINE_CONTROL,
85: BASELINE_CONTROL_ORDINAL),
86: MKACTIVITY_BUFFER = CACHE.add(MKACTIVITY,
87: MKACTIVITY_ORDINAL);
88: }
|