comparison src/org/eclipse/jetty/server/Connector.java @ 1005:0e96ce3db20a

remove HttpBuffers
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 23 Oct 2016 02:42:05 -0600
parents 39154cfa58e4
children 58a9c4a42292
comparison
equal deleted inserted replaced
1004:3fa54d9d19cd 1005:0e96ce3db20a
26 import java.util.concurrent.ThreadPoolExecutor; 26 import java.util.concurrent.ThreadPoolExecutor;
27 import java.util.concurrent.atomic.AtomicLong; 27 import java.util.concurrent.atomic.AtomicLong;
28 28
29 import javax.servlet.ServletRequest; 29 import javax.servlet.ServletRequest;
30 30
31 import org.eclipse.jetty.http.HttpBuffers;
32 import org.eclipse.jetty.http.HttpBuffersImpl; 31 import org.eclipse.jetty.http.HttpBuffersImpl;
33 import org.eclipse.jetty.http.HttpFields; 32 import org.eclipse.jetty.http.HttpFields;
34 import org.eclipse.jetty.http.HttpHeaders; 33 import org.eclipse.jetty.http.HttpHeaders;
35 import org.eclipse.jetty.http.HttpSchemes; 34 import org.eclipse.jetty.http.HttpSchemes;
36 import org.eclipse.jetty.io.Buffers; 35 import org.eclipse.jetty.io.Buffers;
51 * <li>Socket configuration</li> 50 * <li>Socket configuration</li>
52 * <li>Base acceptor thread</li> 51 * <li>Base acceptor thread</li>
53 * <li>Optional reverse proxy headers checking</li> 52 * <li>Optional reverse proxy headers checking</li>
54 * </ul> 53 * </ul>
55 */ 54 */
56 public abstract class Connector extends AggregateLifeCycle implements HttpBuffers, Dumpable, Runnable 55 public abstract class Connector extends AggregateLifeCycle implements Dumpable, Runnable
57 { 56 {
58 private static final Logger LOG = LoggerFactory.getLogger(Connector.class); 57 private static final Logger LOG = LoggerFactory.getLogger(Connector.class);
59 58
60 private String _name; 59 private String _name;
61 60
182 } 181 }
183 182
184 protected abstract void accept() throws IOException, InterruptedException; 183 protected abstract void accept() throws IOException, InterruptedException;
185 184
186 @Override 185 @Override
187 public final int getRequestBufferSize()
188 {
189 return _buffers.getRequestBufferSize();
190 }
191
192 @Override
193 public final void setRequestBufferSize(int requestBufferSize)
194 {
195 _buffers.setRequestBufferSize(requestBufferSize);
196 }
197
198 @Override
199 public final int getRequestHeaderSize()
200 {
201 return _buffers.getRequestHeaderSize();
202 }
203
204 @Override
205 public final void setRequestHeaderSize(int requestHeaderSize)
206 {
207 _buffers.setRequestHeaderSize(requestHeaderSize);
208 }
209
210 @Override
211 public final int getResponseBufferSize()
212 {
213 return _buffers.getResponseBufferSize();
214 }
215
216 @Override
217 public final void setResponseBufferSize(int responseBufferSize)
218 {
219 _buffers.setResponseBufferSize(responseBufferSize);
220 }
221
222 @Override
223 public final int getResponseHeaderSize()
224 {
225 return _buffers.getResponseHeaderSize();
226 }
227
228 @Override
229 public final void setResponseHeaderSize(int responseHeaderSize)
230 {
231 _buffers.setResponseHeaderSize(responseHeaderSize);
232 }
233
234 @Override
235 public final Type getRequestBufferType()
236 {
237 return _buffers.getRequestBufferType();
238 }
239
240 @Override
241 public final Type getRequestHeaderType()
242 {
243 return _buffers.getRequestHeaderType();
244 }
245
246 @Override
247 public final Type getResponseBufferType()
248 {
249 return _buffers.getResponseBufferType();
250 }
251
252 @Override
253 public final Type getResponseHeaderType()
254 {
255 return _buffers.getResponseHeaderType();
256 }
257
258 @Override
259 public final void setRequestBuffers(Buffers requestBuffers)
260 {
261 _buffers.setRequestBuffers(requestBuffers);
262 }
263
264 @Override
265 public final void setResponseBuffers(Buffers responseBuffers)
266 {
267 _buffers.setResponseBuffers(responseBuffers);
268 }
269
270 @Override
271 public final Buffers getRequestBuffers()
272 {
273 return _buffers.getRequestBuffers();
274 }
275
276 @Override
277 public final Buffers getResponseBuffers()
278 {
279 return _buffers.getResponseBuffers();
280 }
281
282 @Override
283 public final int getMaxBuffers()
284 {
285 return _buffers.getMaxBuffers();
286 }
287
288 @Override
289 public String toString() 186 public String toString()
290 { 187 {
291 return String.format("%s@%s:%d", 188 return String.format("%s@%s:%d",
292 getClass().getSimpleName(), 189 getClass().getSimpleName(),
293 getHost()==null?"0.0.0.0":getHost(), 190 getHost()==null?"0.0.0.0":getHost(),
345 242
346 // from AbstractNIOConnector 243 // from AbstractNIOConnector
347 244
348 public final boolean getUseDirectBuffers() 245 public final boolean getUseDirectBuffers()
349 { 246 {
350 return getRequestBufferType()==Type.DIRECT; 247 return _buffers.getRequestBufferType()==Type.DIRECT;
351 } 248 }
352 249
353 /* ------------------------------------------------------------------------------- */ 250 /* ------------------------------------------------------------------------------- */
354 /** 251 /**
355 * @param direct If True (the default), the connector can use NIO direct buffers. 252 * @param direct If True (the default), the connector can use NIO direct buffers.