Mercurial Hosting > luan
annotate src/org/eclipse/jetty/http/HttpBuffersImpl.java @ 886:0d876a03ab0b
add back Server.addConnector() - needed for ssl
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 04 Oct 2016 20:27:50 -0600 |
parents | 688b875e18ba |
children | 0e96ce3db20a |
rev | line source |
---|---|
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
1 // |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
2 // ======================================================================== |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
3 // Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd. |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
4 // ------------------------------------------------------------------------ |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
5 // All rights reserved. This program and the accompanying materials |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
6 // are made available under the terms of the Eclipse Public License v1.0 |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
7 // and Apache License v2.0 which accompanies this distribution. |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
8 // |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
9 // The Eclipse Public License is available at |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
10 // http://www.eclipse.org/legal/epl-v10.html |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
11 // |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
12 // The Apache License v2.0 is available at |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
13 // http://www.opensource.org/licenses/apache2.0.php |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
14 // |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
15 // You may elect to redistribute this code under either of these licenses. |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
16 // ======================================================================== |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
17 // |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
18 |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
19 package org.eclipse.jetty.http; |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
20 |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
21 import org.eclipse.jetty.io.Buffers; |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
22 import org.eclipse.jetty.io.BuffersFactory; |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
23 import org.eclipse.jetty.util.component.AbstractLifeCycle; |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
24 |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
25 /* ------------------------------------------------------------ */ |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
26 /** Abstract Buffer pool. |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
27 * simple unbounded pool of buffers for header, request and response sizes. |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
28 * |
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
29 */ |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
30 public final class HttpBuffersImpl extends AbstractLifeCycle implements HttpBuffers |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
31 { |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
32 private int _requestBufferSize=16*1024; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
33 private int _requestHeaderSize=6*1024; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
34 private int _responseBufferSize=32*1024; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
35 private int _responseHeaderSize=6*1024; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
36 private final int _maxBuffers=1024; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
37 |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
38 private Buffers.Type _requestBufferType=Buffers.Type.BYTE_ARRAY; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
39 private Buffers.Type _requestHeaderType=Buffers.Type.BYTE_ARRAY; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
40 private Buffers.Type _responseBufferType=Buffers.Type.BYTE_ARRAY; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
41 private Buffers.Type _responseHeaderType=Buffers.Type.BYTE_ARRAY; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
42 |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
43 private Buffers _requestBuffers; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
44 private Buffers _responseBuffers; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
45 |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
46 |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
47 public HttpBuffersImpl() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
48 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
49 super(); |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
50 } |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
51 |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
52 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
53 * @return the requestBufferSize |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
54 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
55 public int getRequestBufferSize() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
56 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
57 return _requestBufferSize; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
58 } |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
59 |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
60 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
61 * @param requestBufferSize the requestBufferSize to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
62 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
63 public void setRequestBufferSize(int requestBufferSize) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
64 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
65 _requestBufferSize = requestBufferSize; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
66 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
67 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
68 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
69 * @return the requestHeaderSize |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
70 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
71 public int getRequestHeaderSize() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
72 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
73 return _requestHeaderSize; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
74 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
75 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
76 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
77 * @param requestHeaderSize the requestHeaderSize to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
78 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
79 public void setRequestHeaderSize(int requestHeaderSize) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
80 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
81 _requestHeaderSize = requestHeaderSize; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
82 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
83 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
84 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
85 * @return the responseBufferSize |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
86 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
87 public int getResponseBufferSize() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
88 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
89 return _responseBufferSize; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
90 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
91 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
92 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
93 * @param responseBufferSize the responseBufferSize to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
94 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
95 public void setResponseBufferSize(int responseBufferSize) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
96 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
97 _responseBufferSize = responseBufferSize; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
98 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
99 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
100 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
101 * @return the responseHeaderSize |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
102 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
103 public int getResponseHeaderSize() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
104 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
105 return _responseHeaderSize; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
106 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
107 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
108 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
109 * @param responseHeaderSize the responseHeaderSize to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
110 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
111 public void setResponseHeaderSize(int responseHeaderSize) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
112 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
113 _responseHeaderSize = responseHeaderSize; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
114 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
115 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
116 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
117 * @return the requestBufferType |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
118 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
119 public Buffers.Type getRequestBufferType() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
120 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
121 return _requestBufferType; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
122 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
123 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
124 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
125 * @param requestBufferType the requestBufferType to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
126 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
127 public void setRequestBufferType(Buffers.Type requestBufferType) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
128 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
129 _requestBufferType = requestBufferType; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
130 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
131 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
132 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
133 * @return the requestHeaderType |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
134 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
135 public Buffers.Type getRequestHeaderType() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
136 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
137 return _requestHeaderType; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
138 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
139 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
140 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
141 * @param requestHeaderType the requestHeaderType to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
142 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
143 public void setRequestHeaderType(Buffers.Type requestHeaderType) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
144 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
145 _requestHeaderType = requestHeaderType; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
146 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
147 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
148 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
149 * @return the responseBufferType |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
150 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
151 public Buffers.Type getResponseBufferType() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
152 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
153 return _responseBufferType; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
154 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
155 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
156 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
157 * @param responseBufferType the responseBufferType to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
158 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
159 public void setResponseBufferType(Buffers.Type responseBufferType) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
160 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
161 _responseBufferType = responseBufferType; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
162 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
163 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
164 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
165 * @return the responseHeaderType |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
166 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
167 public Buffers.Type getResponseHeaderType() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
168 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
169 return _responseHeaderType; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
170 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
171 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
172 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
173 * @param responseHeaderType the responseHeaderType to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
174 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
175 public void setResponseHeaderType(Buffers.Type responseHeaderType) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
176 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
177 _responseHeaderType = responseHeaderType; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
178 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
179 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
180 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
181 * @param requestBuffers the requestBuffers to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
182 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
183 public void setRequestBuffers(Buffers requestBuffers) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
184 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
185 _requestBuffers = requestBuffers; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
186 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
187 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
188 /** |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
189 * @param responseBuffers the responseBuffers to set |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
190 */ |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
191 public void setResponseBuffers(Buffers responseBuffers) |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
192 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
193 _responseBuffers = responseBuffers; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
194 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
195 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
196 @Override |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
197 protected void doStart() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
198 throws Exception |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
199 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
200 _requestBuffers=BuffersFactory.newBuffers(_requestHeaderType,_requestHeaderSize,_requestBufferType,_requestBufferSize,_requestBufferType,getMaxBuffers()); |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
201 _responseBuffers=BuffersFactory.newBuffers(_responseHeaderType,_responseHeaderSize,_responseBufferType,_responseBufferSize,_responseBufferType,getMaxBuffers()); |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
202 super.doStart(); |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
203 } |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
204 |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
205 @Override |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
206 protected void doStop() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
207 throws Exception |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
208 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
209 _requestBuffers=null; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
210 _responseBuffers=null; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
211 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
212 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
213 public Buffers getRequestBuffers() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
214 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
215 return _requestBuffers; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
216 } |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
217 |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
218 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
219 public Buffers getResponseBuffers() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
220 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
221 return _responseBuffers; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
222 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
223 |
868
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
224 public int getMaxBuffers() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
225 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
226 return _maxBuffers; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
227 } |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
228 |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
229 public String toString() |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
230 { |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
231 return _requestBuffers+"/"+_responseBuffers; |
688b875e18ba
remove ThreadLocalBuffers
Franklin Schmidt <fschmidt@gmail.com>
parents:
802
diff
changeset
|
232 } |
802
3428c60d7cfc
replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff
changeset
|
233 } |