comparison src/org/eclipse/jetty/server/Connector.java @ 1048:2b769da7f67d

remove Buffer
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 07 Nov 2016 23:15:42 -0700
parents 1accf965d51a
children ebb0f1343ef6
comparison
equal deleted inserted replaced
1047:1accf965d51a 1048:2b769da7f67d
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.io.Buffer; 31 import org.eclipse.jetty.io.JBuffer;
32 import org.eclipse.jetty.io.Buffers; 32 import org.eclipse.jetty.io.Buffers;
33 import org.eclipse.jetty.io.BufferUtil; 33 import org.eclipse.jetty.io.BufferUtil;
34 import org.eclipse.jetty.io.EndPoint; 34 import org.eclipse.jetty.io.EndPoint;
35 import org.eclipse.jetty.io.EofException; 35 import org.eclipse.jetty.io.EofException;
36 import org.eclipse.jetty.util.component.AggregateLifeCycle; 36 import org.eclipse.jetty.util.component.AggregateLifeCycle;
41 /** 41 /**
42 * Abstract Connector implementation. This abstract implementation of the Connector interface provides: 42 * Abstract Connector implementation. This abstract implementation of the Connector interface provides:
43 * <ul> 43 * <ul>
44 * <li>AbstractLifeCycle implementation</li> 44 * <li>AbstractLifeCycle implementation</li>
45 * <li>Implementations for connector getters and setters</li> 45 * <li>Implementations for connector getters and setters</li>
46 * <li>Buffer management</li> 46 * <li>JBuffer management</li>
47 * <li>Socket configuration</li> 47 * <li>Socket configuration</li>
48 * <li>Base acceptor thread</li> 48 * <li>Base acceptor thread</li>
49 * <li>Optional reverse proxy headers checking</li> 49 * <li>Optional reverse proxy headers checking</li>
50 * </ul> 50 * </ul>
51 */ 51 */
249 } 249 }
250 250
251 251
252 // my own buffers 252 // my own buffers
253 253
254 protected Buffer newBuffer(int size) { 254 protected JBuffer newBuffer(int size) {
255 return BufferUtil.newDirectBuffer(size); 255 return BufferUtil.newDirectBuffer(size);
256 } 256 }
257 257
258 private class MyBuffers implements Buffers { 258 private class MyBuffers implements Buffers {
259 private final int headerSize; 259 private final int headerSize;
263 this.headerSize = headerSize; 263 this.headerSize = headerSize;
264 this.bufferSize = bufferSize; 264 this.bufferSize = bufferSize;
265 } 265 }
266 266
267 @Override 267 @Override
268 public Buffer getHeader() { 268 public JBuffer getHeader() {
269 return BufferUtil.newBuffer(headerSize); 269 return BufferUtil.newBuffer(headerSize);
270 } 270 }
271 271
272 @Override 272 @Override
273 public Buffer getBuffer() { 273 public JBuffer getBuffer() {
274 return newBuffer(bufferSize); 274 return newBuffer(bufferSize);
275 } 275 }
276 276
277 @Override 277 @Override
278 public Buffer getBuffer(int size) { 278 public JBuffer getBuffer(int size) {
279 return newBuffer(size); 279 return newBuffer(size);
280 } 280 }
281 } 281 }
282 } 282 }