Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/AbstractConnector.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 | ad292e148964 |
| children | e21ca9878a10 |
comparison
equal
deleted
inserted
replaced
| 819:17bd0b170ed6 | 820:8e9db0bbf4f9 |
|---|---|
| 36 import org.eclipse.jetty.io.Connection; | 36 import org.eclipse.jetty.io.Connection; |
| 37 import org.eclipse.jetty.io.EndPoint; | 37 import org.eclipse.jetty.io.EndPoint; |
| 38 import org.eclipse.jetty.io.EofException; | 38 import org.eclipse.jetty.io.EofException; |
| 39 import org.eclipse.jetty.util.component.AggregateLifeCycle; | 39 import org.eclipse.jetty.util.component.AggregateLifeCycle; |
| 40 import org.eclipse.jetty.util.component.Dumpable; | 40 import org.eclipse.jetty.util.component.Dumpable; |
| 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 import org.eclipse.jetty.util.thread.ThreadPool; | 43 import org.eclipse.jetty.util.thread.ThreadPool; |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * Abstract Connector implementation. This abstract implementation of the Connector interface provides: | 46 * Abstract Connector implementation. This abstract implementation of the Connector interface provides: |
| 47 * <ul> | 47 * <ul> |
| 53 * <li>Optional reverse proxy headers checking</li> | 53 * <li>Optional reverse proxy headers checking</li> |
| 54 * </ul> | 54 * </ul> |
| 55 */ | 55 */ |
| 56 public abstract class AbstractConnector extends AggregateLifeCycle implements HttpBuffers, Connector, Dumpable | 56 public abstract class AbstractConnector extends AggregateLifeCycle implements HttpBuffers, Connector, Dumpable |
| 57 { | 57 { |
| 58 private static final Logger LOG = Log.getLogger(AbstractConnector.class); | 58 private static final Logger LOG = LoggerFactory.getLogger(AbstractConnector.class); |
| 59 | 59 |
| 60 private String _name; | 60 private String _name; |
| 61 | 61 |
| 62 private Server _server; | 62 private Server _server; |
| 63 private ThreadPool _threadPool; | 63 private ThreadPool _threadPool; |
| 335 { | 335 { |
| 336 close(); | 336 close(); |
| 337 } | 337 } |
| 338 catch (IOException e) | 338 catch (IOException e) |
| 339 { | 339 { |
| 340 LOG.warn(e); | 340 LOG.warn("",e); |
| 341 } | 341 } |
| 342 | 342 |
| 343 super.doStop(); | 343 super.doStop(); |
| 344 | 344 |
| 345 Thread[] acceptors; | 345 Thread[] acceptors; |
| 383 else | 383 else |
| 384 socket.setSoLinger(false,0); | 384 socket.setSoLinger(false,0); |
| 385 } | 385 } |
| 386 catch (Exception e) | 386 catch (Exception e) |
| 387 { | 387 { |
| 388 LOG.ignore(e); | 388 LOG.trace("",e); |
| 389 } | 389 } |
| 390 } | 390 } |
| 391 | 391 |
| 392 /* ------------------------------------------------------------ */ | 392 /* ------------------------------------------------------------ */ |
| 393 public void customize(EndPoint endpoint, Request request) throws IOException | 393 public void customize(EndPoint endpoint, Request request) throws IOException |
| 457 { | 457 { |
| 458 inetAddress = InetAddress.getByName(forwardedFor); | 458 inetAddress = InetAddress.getByName(forwardedFor); |
| 459 } | 459 } |
| 460 catch (UnknownHostException e) | 460 catch (UnknownHostException e) |
| 461 { | 461 { |
| 462 LOG.ignore(e); | 462 LOG.trace("",e); |
| 463 } | 463 } |
| 464 } | 464 } |
| 465 | 465 |
| 466 request.setRemoteHost(inetAddress == null?forwardedFor:inetAddress.getHostName()); | 466 request.setRemoteHost(inetAddress == null?forwardedFor:inetAddress.getHostName()); |
| 467 } | 467 } |
| 926 { | 926 { |
| 927 accept(_acceptor); | 927 accept(_acceptor); |
| 928 } | 928 } |
| 929 catch (EofException e) | 929 catch (EofException e) |
| 930 { | 930 { |
| 931 LOG.ignore(e); | 931 LOG.trace("",e); |
| 932 } | 932 } |
| 933 catch (IOException e) | 933 catch (IOException e) |
| 934 { | 934 { |
| 935 LOG.ignore(e); | 935 LOG.trace("",e); |
| 936 } | 936 } |
| 937 catch (InterruptedException x) | 937 catch (InterruptedException x) |
| 938 { | 938 { |
| 939 // Connector has been stopped | 939 // Connector has been stopped |
| 940 LOG.ignore(x); | 940 LOG.trace("",x); |
| 941 } | 941 } |
| 942 catch (Throwable e) | 942 catch (Throwable e) |
| 943 { | 943 { |
| 944 LOG.warn(e); | 944 LOG.warn("",e); |
| 945 } | 945 } |
| 946 } | 946 } |
| 947 } | 947 } |
| 948 finally | 948 finally |
| 949 { | 949 { |
