View Javadoc

1   //
2   //  ========================================================================
3   //  Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
4   //  ------------------------------------------------------------------------
5   //  All rights reserved. This program and the accompanying materials
6   //  are made available under the terms of the Eclipse Public License v1.0
7   //  and Apache License v2.0 which accompanies this distribution.
8   //
9   //      The Eclipse Public License is available at
10  //      http://www.eclipse.org/legal/epl-v10.html
11  //
12  //      The Apache License v2.0 is available at
13  //      http://www.opensource.org/licenses/apache2.0.php
14  //
15  //  You may elect to redistribute this code under either of these licenses.
16  //  ========================================================================
17  //
18  
19  package org.eclipse.jetty.ajp;
20  
21  import org.eclipse.jetty.io.Buffer;
22  import org.eclipse.jetty.io.BufferCache;
23  
24  /**
25   * 
26   */
27  public class Ajp13PacketMethods
28  {
29  
30      // TODO - this can probably be replaced by HttpMethods or at least an
31      // extension of it.
32      // It is probably most efficient if "GET" ends up as the same instance
33  
34      public final static String OPTIONS="OPTIONS", GET="GET", HEAD="HEAD", POST="POST", PUT="PUT", DELETE="DELETE", TRACE="TRACE", PROPFIND="PROPFIND",
35              PROPPATCH="PROPPATCH", MKCOL="MKCOL", COPY="COPY", MOVE="MOVE", LOCK="LOCK", UNLOCK="UNLOCK", ACL="ACL", REPORT="REPORT",
36              VERSION_CONTROL="VERSION-CONTROL", CHECKIN="CHECKIN", CHECKOUT="CHECKOUT", UNCHCKOUT="UNCHECKOUT", SEARCH="SEARCH", MKWORKSPACE="MKWORKSPACE",
37              UPDATE="UPDATE", LABEL="LABEL", MERGE="MERGE", BASELINE_CONTROL="BASELINE-CONTROL", MKACTIVITY="MKACTIVITY";
38  
39      public final static int OPTIONS_ORDINAL=1, GET_ORDINAL=2, HEAD_ORDINAL=3, POST__ORDINAL=4, PUT_ORDINAL=5, DELETE_ORDINAL=6, TRACE_ORDINAL=7,
40              PROPFIND_ORDINAL=8, PROPPATCH_ORDINAL=9, MKCOL_ORDINAL=10, COPY_ORDINAL=11, MOVE_ORDINAL=12, LOCK_ORDINAL=13, UNLOCK_ORDINAL=14, ACL_ORDINAL=15,
41              REPORT_ORDINAL=16, VERSION_CONTROL_ORDINAL=17, CHECKIN_ORDINAL=18, CHECKOUT_ORDINAL=19, UNCHCKOUT_ORDINAL=20, SEARCH_ORDINAL=21,
42              MKWORKSPACE_ORDINAL=22, UPDATE_ORDINAL=23, LABEL_ORDINAL=24, MERGE_ORDINAL=25, BASELINE_CONTROL_ORDINAL=26, MKACTIVITY_ORDINAL=27;
43  
44      public final static BufferCache CACHE=new BufferCache();
45  
46      public final static Buffer 
47          OPTIONS_BUFFER=CACHE.add(OPTIONS,OPTIONS_ORDINAL), 
48          GET_BUFFER=CACHE.add(GET,GET_ORDINAL), 
49          HEAD_BUFFER=CACHE.add(HEAD, HEAD_ORDINAL), 
50          POST__BUFFER=CACHE.add(POST,POST__ORDINAL), 
51          PUT_BUFFER=CACHE.add(PUT,PUT_ORDINAL), 
52          DELETE_BUFFER=CACHE.add(DELETE,DELETE_ORDINAL),
53          TRACE_BUFFER=CACHE.add(TRACE,TRACE_ORDINAL), 
54          PROPFIND_BUFFER=CACHE.add(PROPFIND,PROPFIND_ORDINAL), 
55          PROPPATCH_BUFFER=CACHE.add(PROPPATCH, PROPPATCH_ORDINAL), 
56          MKCOL_BUFFER=CACHE.add(MKCOL,MKCOL_ORDINAL), 
57          COPY_BUFFER=CACHE.add(COPY,COPY_ORDINAL), 
58          MOVE_BUFFER=CACHE.add(MOVE,MOVE_ORDINAL), 
59          LOCK_BUFFER=CACHE.add(LOCK,LOCK_ORDINAL), 
60          UNLOCK_BUFFER=CACHE.add(UNLOCK,UNLOCK_ORDINAL), 
61          ACL_BUFFER=CACHE.add(ACL,ACL_ORDINAL), 
62          REPORT_BUFFER=CACHE.add(REPORT,REPORT_ORDINAL), 
63          VERSION_CONTROL_BUFFER=CACHE.add(VERSION_CONTROL,VERSION_CONTROL_ORDINAL),
64          CHECKIN_BUFFER=CACHE.add(CHECKIN,CHECKIN_ORDINAL), 
65          CHECKOUT_BUFFER=CACHE.add(CHECKOUT,CHECKOUT_ORDINAL), 
66          UNCHCKOUT_BUFFER=CACHE.add(UNCHCKOUT,UNCHCKOUT_ORDINAL), 
67          SEARCH_BUFFER=CACHE.add(SEARCH,SEARCH_ORDINAL), 
68          MKWORKSPACE_BUFFER=CACHE.add(MKWORKSPACE,MKWORKSPACE_ORDINAL),
69          UPDATE_BUFFER=CACHE.add(UPDATE,UPDATE_ORDINAL), 
70          LABEL_BUFFER=CACHE.add(LABEL,LABEL_ORDINAL), 
71          MERGE_BUFFER=CACHE.add(MERGE,MERGE_ORDINAL),
72          BASELINE_CONTROL_BUFFER=CACHE.add(BASELINE_CONTROL,BASELINE_CONTROL_ORDINAL), 
73          MKACTIVITY_BUFFER=CACHE.add(MKACTIVITY,MKACTIVITY_ORDINAL);
74  }