Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/bio/SocketConnector.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 | 6b210bb66c63 |
comparison
equal
deleted
inserted
replaced
819:17bd0b170ed6 | 820:8e9db0bbf4f9 |
---|---|
36 import org.eclipse.jetty.server.AbstractConnector; | 36 import org.eclipse.jetty.server.AbstractConnector; |
37 import org.eclipse.jetty.server.AbstractHttpConnection; | 37 import org.eclipse.jetty.server.AbstractHttpConnection; |
38 import org.eclipse.jetty.server.BlockingHttpConnection; | 38 import org.eclipse.jetty.server.BlockingHttpConnection; |
39 import org.eclipse.jetty.server.Request; | 39 import org.eclipse.jetty.server.Request; |
40 import org.eclipse.jetty.util.component.AggregateLifeCycle; | 40 import org.eclipse.jetty.util.component.AggregateLifeCycle; |
41 import org.eclipse.jetty.util.log.Log; | 41 import org.slf4j.Logger; |
42 import org.eclipse.jetty.util.log.Logger; | 42 import org.slf4j.LoggerFactory; |
43 | 43 |
44 | 44 |
45 /* ------------------------------------------------------------------------------- */ | 45 /* ------------------------------------------------------------------------------- */ |
46 /** Socket Connector. | 46 /** Socket Connector. |
47 * This connector implements a traditional blocking IO and threading model. | 47 * This connector implements a traditional blocking IO and threading model. |
54 * | 54 * |
55 * | 55 * |
56 */ | 56 */ |
57 public class SocketConnector extends AbstractConnector | 57 public class SocketConnector extends AbstractConnector |
58 { | 58 { |
59 private static final Logger LOG = Log.getLogger(SocketConnector.class); | 59 private static final Logger LOG = LoggerFactory.getLogger(SocketConnector.class); |
60 | 60 |
61 protected ServerSocket _serverSocket; | 61 protected ServerSocket _serverSocket; |
62 protected final Set<EndPoint> _connections; | 62 protected final Set<EndPoint> _connections; |
63 protected volatile int _localPort=-1; | 63 protected volatile int _localPort=-1; |
64 | 64 |
266 } | 266 } |
267 catch (EofException e) | 267 catch (EofException e) |
268 { | 268 { |
269 LOG.debug("EOF", e); | 269 LOG.debug("EOF", e); |
270 try{close();} | 270 try{close();} |
271 catch(IOException e2){LOG.ignore(e2);} | 271 catch(IOException e2){LOG.trace("",e2);} |
272 } | 272 } |
273 catch (SocketException e) | 273 catch (SocketException e) |
274 { | 274 { |
275 LOG.debug("EOF", e); | 275 LOG.debug("EOF", e); |
276 try{close();} | 276 try{close();} |
277 catch(IOException e2){LOG.ignore(e2);} | 277 catch(IOException e2){LOG.trace("",e2);} |
278 } | 278 } |
279 catch (HttpException e) | 279 catch (HttpException e) |
280 { | 280 { |
281 LOG.debug("BAD", e); | 281 LOG.debug("BAD", e); |
282 try{close();} | 282 try{close();} |
283 catch(IOException e2){LOG.ignore(e2);} | 283 catch(IOException e2){LOG.trace("",e2);} |
284 } | 284 } |
285 catch(Exception e) | 285 catch(Exception e) |
286 { | 286 { |
287 LOG.warn("handle failed?",e); | 287 LOG.warn("handle failed?",e); |
288 try{close();} | 288 try{close();} |
289 catch(IOException e2){LOG.ignore(e2);} | 289 catch(IOException e2){LOG.trace("",e2);} |
290 } | 290 } |
291 finally | 291 finally |
292 { | 292 { |
293 connectionClosed(_connection); | 293 connectionClosed(_connection); |
294 synchronized(_connections) | 294 synchronized(_connections) |
315 _socket.close(); | 315 _socket.close(); |
316 } | 316 } |
317 } | 317 } |
318 catch(IOException e) | 318 catch(IOException e) |
319 { | 319 { |
320 LOG.ignore(e); | 320 LOG.trace("",e); |
321 } | 321 } |
322 } | 322 } |
323 } | 323 } |
324 } | 324 } |
325 } | 325 } |