Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/nio/SslConnection.java @ 1046:a8c92b0a08ed
add JBuffer
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 07 Nov 2016 22:39:39 -0700 |
parents | b71ad168fe34 |
children | 2b769da7f67d |
comparison
equal
deleted
inserted
replaced
1045:48506d03e230 | 1046:a8c92b0a08ed |
---|---|
29 import javax.net.ssl.SSLSession; | 29 import javax.net.ssl.SSLSession; |
30 | 30 |
31 import org.eclipse.jetty.io.AbstractConnection; | 31 import org.eclipse.jetty.io.AbstractConnection; |
32 import org.eclipse.jetty.io.AsyncEndPoint; | 32 import org.eclipse.jetty.io.AsyncEndPoint; |
33 import org.eclipse.jetty.io.Buffer; | 33 import org.eclipse.jetty.io.Buffer; |
34 import org.eclipse.jetty.io.BufferUtil; | |
34 import org.eclipse.jetty.io.EndPoint; | 35 import org.eclipse.jetty.io.EndPoint; |
35 import org.eclipse.jetty.server.AsyncHttpConnection; | 36 import org.eclipse.jetty.server.AsyncHttpConnection; |
36 import org.slf4j.Logger; | 37 import org.slf4j.Logger; |
37 import org.slf4j.LoggerFactory; | 38 import org.slf4j.LoggerFactory; |
38 | 39 |
48 */ | 49 */ |
49 public final class SslConnection extends AbstractConnection implements AsyncConnection | 50 public final class SslConnection extends AbstractConnection implements AsyncConnection |
50 { | 51 { |
51 private final Logger _logger = LoggerFactory.getLogger("org.eclipse.jetty.io.nio.ssl"); | 52 private final Logger _logger = LoggerFactory.getLogger("org.eclipse.jetty.io.nio.ssl"); |
52 | 53 |
53 private static final NIOBuffer __ZERO_BUFFER = new IndirectNIOBuffer(0); | 54 private static final NIOBuffer __ZERO_BUFFER = BufferUtil.EMPTY_BUFFER; |
54 | 55 |
55 private static final ThreadLocal<SslBuffers> __buffers = new ThreadLocal<SslBuffers>(); | 56 private static final ThreadLocal<SslBuffers> __buffers = new ThreadLocal<SslBuffers>(); |
56 private final SSLEngine _engine; | 57 private final SSLEngine _engine; |
57 private final SSLSession _session; | 58 private final SSLSession _session; |
58 private AsyncHttpConnection _connection; | 59 private AsyncHttpConnection _connection; |
78 final NIOBuffer _out; | 79 final NIOBuffer _out; |
79 final NIOBuffer _unwrap; | 80 final NIOBuffer _unwrap; |
80 | 81 |
81 SslBuffers(int packetSize, int appSize) | 82 SslBuffers(int packetSize, int appSize) |
82 { | 83 { |
83 _in=new IndirectNIOBuffer(packetSize); | 84 _in = BufferUtil.newBuffer(packetSize); |
84 _out=new IndirectNIOBuffer(packetSize); | 85 _out = BufferUtil.newBuffer(packetSize); |
85 _unwrap=new IndirectNIOBuffer(appSize); | 86 _unwrap = BufferUtil.newBuffer(appSize); |
86 } | 87 } |
87 } | 88 } |
88 | 89 |
89 public SslConnection(SSLEngine engine,AsyncEndPoint endp) | 90 public SslConnection(SSLEngine engine,AsyncEndPoint endp) |
90 { | 91 { |