Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/nio/SslConnection.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 | b77d631b9e28 |
comparison
equal
deleted
inserted
replaced
819:17bd0b170ed6 | 820:8e9db0bbf4f9 |
---|---|
30 import org.eclipse.jetty.io.AbstractConnection; | 30 import org.eclipse.jetty.io.AbstractConnection; |
31 import org.eclipse.jetty.io.AsyncEndPoint; | 31 import org.eclipse.jetty.io.AsyncEndPoint; |
32 import org.eclipse.jetty.io.Buffer; | 32 import org.eclipse.jetty.io.Buffer; |
33 import org.eclipse.jetty.io.Connection; | 33 import org.eclipse.jetty.io.Connection; |
34 import org.eclipse.jetty.io.EndPoint; | 34 import org.eclipse.jetty.io.EndPoint; |
35 import org.eclipse.jetty.util.log.Log; | 35 import org.slf4j.Logger; |
36 import org.eclipse.jetty.util.log.Logger; | 36 import org.slf4j.LoggerFactory; |
37 import org.eclipse.jetty.util.thread.Timeout.Task; | 37 import org.eclipse.jetty.util.thread.Timeout.Task; |
38 | 38 |
39 /* ------------------------------------------------------------ */ | 39 /* ------------------------------------------------------------ */ |
40 /** SSL Connection. | 40 /** SSL Connection. |
41 * An AysyncConnection that acts as an interceptor between and EndPoint and another | 41 * An AysyncConnection that acts as an interceptor between and EndPoint and another |
45 * it's source/sink of encrypted data. It then provides {@link #getSslEndPoint()} to | 45 * it's source/sink of encrypted data. It then provides {@link #getSslEndPoint()} to |
46 * expose a source/sink of unencrypted data to another connection (eg HttpConnection). | 46 * expose a source/sink of unencrypted data to another connection (eg HttpConnection). |
47 */ | 47 */ |
48 public class SslConnection extends AbstractConnection implements AsyncConnection | 48 public class SslConnection extends AbstractConnection implements AsyncConnection |
49 { | 49 { |
50 private final Logger _logger = Log.getLogger("org.eclipse.jetty.io.nio.ssl"); | 50 private final Logger _logger = LoggerFactory.getLogger("org.eclipse.jetty.io.nio.ssl"); |
51 | 51 |
52 private static final NIOBuffer __ZERO_BUFFER=new IndirectNIOBuffer(0); | 52 private static final NIOBuffer __ZERO_BUFFER=new IndirectNIOBuffer(0); |
53 | 53 |
54 private static final ThreadLocal<SslBuffers> __buffers = new ThreadLocal<SslBuffers>(); | 54 private static final ThreadLocal<SslBuffers> __buffers = new ThreadLocal<SslBuffers>(); |
55 private final SSLEngine _engine; | 55 private final SSLEngine _engine; |
217 catch(Throwable x) | 217 catch(Throwable x) |
218 { | 218 { |
219 _logger.warn("onInputShutdown failed", x); | 219 _logger.warn("onInputShutdown failed", x); |
220 try{_sslEndPoint.close();} | 220 try{_sslEndPoint.close();} |
221 catch(IOException e2){ | 221 catch(IOException e2){ |
222 _logger.ignore(e2);} | 222 _logger.trace("",e2);} |
223 } | 223 } |
224 } | 224 } |
225 } | 225 } |
226 | 226 |
227 return this; | 227 return this; |
259 else | 259 else |
260 _sslEndPoint.shutdownOutput(); | 260 _sslEndPoint.shutdownOutput(); |
261 } | 261 } |
262 catch (IOException e) | 262 catch (IOException e) |
263 { | 263 { |
264 _logger.warn(e); | 264 _logger.warn("",e); |
265 super.onIdleExpired(idleForMs); | 265 super.onIdleExpired(idleForMs); |
266 } | 266 } |
267 } | 267 } |
268 | 268 |
269 /* ------------------------------------------------------------ */ | 269 /* ------------------------------------------------------------ */ |
434 { | 434 { |
435 _engine.closeInbound(); | 435 _engine.closeInbound(); |
436 } | 436 } |
437 catch (SSLException x) | 437 catch (SSLException x) |
438 { | 438 { |
439 _logger.debug(x); | 439 _logger.debug("",x); |
440 } | 440 } |
441 } | 441 } |
442 | 442 |
443 private synchronized boolean wrap(final Buffer buffer) throws IOException | 443 private synchronized boolean wrap(final Buffer buffer) throws IOException |
444 { | 444 { |