Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/nio/BlockingChannelConnector.java @ 820:8e9db0bbf4f9
remove org.eclipse.jetty.util.log and upgrade slf4j
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 13 Sep 2016 23:13:06 -0600 |
parents | 3428c60d7cfc |
children | 0f53601ea489 |
comparison
equal
deleted
inserted
replaced
819:17bd0b170ed6 | 820:8e9db0bbf4f9 |
---|---|
35 import org.eclipse.jetty.io.EofException; | 35 import org.eclipse.jetty.io.EofException; |
36 import org.eclipse.jetty.io.nio.ChannelEndPoint; | 36 import org.eclipse.jetty.io.nio.ChannelEndPoint; |
37 import org.eclipse.jetty.server.BlockingHttpConnection; | 37 import org.eclipse.jetty.server.BlockingHttpConnection; |
38 import org.eclipse.jetty.server.Request; | 38 import org.eclipse.jetty.server.Request; |
39 import org.eclipse.jetty.util.ConcurrentHashSet; | 39 import org.eclipse.jetty.util.ConcurrentHashSet; |
40 import org.eclipse.jetty.util.log.Log; | 40 import org.slf4j.Logger; |
41 import org.eclipse.jetty.util.log.Logger; | 41 import org.slf4j.LoggerFactory; |
42 | 42 |
43 | 43 |
44 /* ------------------------------------------------------------------------------- */ | 44 /* ------------------------------------------------------------------------------- */ |
45 /** Blocking NIO connector. | 45 /** Blocking NIO connector. |
46 * This connector uses efficient NIO buffers with a traditional blocking thread model. | 46 * This connector uses efficient NIO buffers with a traditional blocking thread model. |
53 * | 53 * |
54 * | 54 * |
55 */ | 55 */ |
56 public class BlockingChannelConnector extends AbstractNIOConnector | 56 public class BlockingChannelConnector extends AbstractNIOConnector |
57 { | 57 { |
58 private static final Logger LOG = Log.getLogger(BlockingChannelConnector.class); | 58 private static final Logger LOG = LoggerFactory.getLogger(BlockingChannelConnector.class); |
59 | 59 |
60 private transient ServerSocketChannel _acceptChannel; | 60 private transient ServerSocketChannel _acceptChannel; |
61 private final Set<BlockingChannelEndPoint> _endpoints = new ConcurrentHashSet<BlockingChannelEndPoint>(); | 61 private final Set<BlockingChannelEndPoint> _endpoints = new ConcurrentHashSet<BlockingChannelEndPoint>(); |
62 | 62 |
63 | 63 |
99 endp.checkIdleTimestamp(now); | 99 endp.checkIdleTimestamp(now); |
100 } | 100 } |
101 } | 101 } |
102 catch(InterruptedException e) | 102 catch(InterruptedException e) |
103 { | 103 { |
104 LOG.ignore(e); | 104 LOG.trace("",e); |
105 } | 105 } |
106 catch(Exception e) | 106 catch(Exception e) |
107 { | 107 { |
108 LOG.warn(e); | 108 LOG.warn("",e); |
109 } | 109 } |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 }); | 113 }); |
215 { | 215 { |
216 super.close(); | 216 super.close(); |
217 } | 217 } |
218 catch (IOException e) | 218 catch (IOException e) |
219 { | 219 { |
220 LOG.ignore(e); | 220 LOG.trace("",e); |
221 } | 221 } |
222 } | 222 } |
223 | 223 |
224 /* ------------------------------------------------------------ */ | 224 /* ------------------------------------------------------------ */ |
225 void dispatch() throws IOException | 225 void dispatch() throws IOException |
301 } | 301 } |
302 catch (EofException e) | 302 catch (EofException e) |
303 { | 303 { |
304 LOG.debug("EOF", e); | 304 LOG.debug("EOF", e); |
305 try{BlockingChannelEndPoint.this.close();} | 305 try{BlockingChannelEndPoint.this.close();} |
306 catch(IOException e2){LOG.ignore(e2);} | 306 catch(IOException e2){LOG.trace("",e2);} |
307 } | 307 } |
308 catch (HttpException e) | 308 catch (HttpException e) |
309 { | 309 { |
310 LOG.debug("BAD", e); | 310 LOG.debug("BAD", e); |
311 try{super.close();} | 311 try{super.close();} |
312 catch(IOException e2){LOG.ignore(e2);} | 312 catch(IOException e2){LOG.trace("",e2);} |
313 } | 313 } |
314 catch(Throwable e) | 314 catch(Throwable e) |
315 { | 315 { |
316 LOG.warn("handle failed",e); | 316 LOG.warn("handle failed",e); |
317 try{super.close();} | 317 try{super.close();} |
318 catch(IOException e2){LOG.ignore(e2);} | 318 catch(IOException e2){LOG.trace("",e2);} |
319 } | 319 } |
320 finally | 320 finally |
321 { | 321 { |
322 connectionClosed(_connection); | 322 connectionClosed(_connection); |
323 _endpoints.remove(this); | 323 _endpoints.remove(this); |
341 _socket.close(); | 341 _socket.close(); |
342 } | 342 } |
343 } | 343 } |
344 catch(IOException e) | 344 catch(IOException e) |
345 { | 345 { |
346 LOG.ignore(e); | 346 LOG.trace("",e); |
347 } | 347 } |
348 } | 348 } |
349 } | 349 } |
350 | 350 |
351 /* ------------------------------------------------------------ */ | 351 /* ------------------------------------------------------------ */ |