Package org.eclipse.jetty.http2
Class HTTP2Connection
- java.lang.Object
-
- org.eclipse.jetty.io.AbstractConnection
-
- org.eclipse.jetty.http2.HTTP2Connection
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.eclipse.jetty.io.Connection,org.eclipse.jetty.io.WriteFlusher.Listener
- Direct Known Subclasses:
HTTP2ClientConnectionFactory.HTTP2ClientConnection,HTTP2ServerConnection
public class HTTP2Connection extends org.eclipse.jetty.io.AbstractConnection implements org.eclipse.jetty.io.WriteFlusher.Listener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classHTTP2Connection.FillableCallbackprotected classHTTP2Connection.HTTP2Producerprivate classHTTP2Connection.NetworkBufferprivate classHTTP2Connection.ParserListener
-
Field Summary
Fields Modifier and Type Field Description private intbufferSizeprivate org.eclipse.jetty.io.ByteBufferPoolbyteBufferPoolprivate java.util.concurrent.atomic.AtomicLongbytesInprotected static org.eclipse.jetty.util.log.LoggerLOGprivate static booleanPEC_MODEprivate HTTP2Connection.HTTP2Producerproducerprivate ISessionsessionprivate org.eclipse.jetty.util.thread.ExecutionStrategystrategyprivate java.util.Queue<java.lang.Runnable>tasks
-
Constructor Summary
Constructors Constructor Description HTTP2Connection(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, java.util.concurrent.Executor executor, org.eclipse.jetty.io.EndPoint endPoint, ISession session, int bufferSize)HTTP2Connection(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, java.util.concurrent.Executor executor, org.eclipse.jetty.io.EndPoint endPoint, Parser parser, ISession session, int bufferSize)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected voiddispatch()private intfill(org.eclipse.jetty.io.EndPoint endPoint, java.nio.ByteBuffer buffer)longgetBytesIn()longgetBytesOut()longgetMessagesIn()longgetMessagesOut()protected ParsergetParser()ISessiongetSession()private voidofferTask(java.lang.Runnable task)protected voidofferTask(java.lang.Runnable task, boolean dispatch)voidonClose()voidonFillable()voidonFlushed(long bytes)booleanonIdleExpired()voidonOpen()private java.lang.RunnablepollTask()protected voidproduce()protected voidsetInputBuffer(java.nio.ByteBuffer buffer)Parser.ListenerwrapParserListener(Parser.Listener listener)-
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addListener, failedCallback, fillInterested, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, isFillInterested, onFillInterestedFailed, onReadTimeout, removeListener, setInputBufferSize, toConnectionString, toString, tryFillInterested, tryFillInterested
-
-
-
-
Field Detail
-
LOG
protected static final org.eclipse.jetty.util.log.Logger LOG
-
PEC_MODE
private static final boolean PEC_MODE
-
tasks
private final java.util.Queue<java.lang.Runnable> tasks
-
producer
private final HTTP2Connection.HTTP2Producer producer
-
bytesIn
private final java.util.concurrent.atomic.AtomicLong bytesIn
-
byteBufferPool
private final org.eclipse.jetty.io.ByteBufferPool byteBufferPool
-
session
private final ISession session
-
bufferSize
private final int bufferSize
-
strategy
private final org.eclipse.jetty.util.thread.ExecutionStrategy strategy
-
-
Constructor Detail
-
HTTP2Connection
@Deprecated public HTTP2Connection(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, java.util.concurrent.Executor executor, org.eclipse.jetty.io.EndPoint endPoint, Parser parser, ISession session, int bufferSize)Deprecated.
-
HTTP2Connection
public HTTP2Connection(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, java.util.concurrent.Executor executor, org.eclipse.jetty.io.EndPoint endPoint, ISession session, int bufferSize)
-
-
Method Detail
-
getMessagesIn
public long getMessagesIn()
- Specified by:
getMessagesInin interfaceorg.eclipse.jetty.io.Connection- Overrides:
getMessagesInin classorg.eclipse.jetty.io.AbstractConnection
-
getMessagesOut
public long getMessagesOut()
- Specified by:
getMessagesOutin interfaceorg.eclipse.jetty.io.Connection- Overrides:
getMessagesOutin classorg.eclipse.jetty.io.AbstractConnection
-
getBytesIn
public long getBytesIn()
- Specified by:
getBytesInin interfaceorg.eclipse.jetty.io.Connection- Overrides:
getBytesInin classorg.eclipse.jetty.io.AbstractConnection
-
getBytesOut
public long getBytesOut()
- Specified by:
getBytesOutin interfaceorg.eclipse.jetty.io.Connection- Overrides:
getBytesOutin classorg.eclipse.jetty.io.AbstractConnection
-
getSession
public ISession getSession()
-
getParser
protected Parser getParser()
-
setInputBuffer
protected void setInputBuffer(java.nio.ByteBuffer buffer)
-
wrapParserListener
public Parser.Listener wrapParserListener(Parser.Listener listener)
-
onOpen
public void onOpen()
- Specified by:
onOpenin interfaceorg.eclipse.jetty.io.Connection- Overrides:
onOpenin classorg.eclipse.jetty.io.AbstractConnection
-
onClose
public void onClose()
- Specified by:
onClosein interfaceorg.eclipse.jetty.io.Connection- Overrides:
onClosein classorg.eclipse.jetty.io.AbstractConnection
-
onFillable
public void onFillable()
- Specified by:
onFillablein classorg.eclipse.jetty.io.AbstractConnection
-
fill
private int fill(org.eclipse.jetty.io.EndPoint endPoint, java.nio.ByteBuffer buffer)
-
onIdleExpired
public boolean onIdleExpired()
- Specified by:
onIdleExpiredin interfaceorg.eclipse.jetty.io.Connection- Overrides:
onIdleExpiredin classorg.eclipse.jetty.io.AbstractConnection
-
offerTask
protected void offerTask(java.lang.Runnable task, boolean dispatch)
-
produce
protected void produce()
-
dispatch
protected void dispatch()
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceorg.eclipse.jetty.io.Connection- Overrides:
closein classorg.eclipse.jetty.io.AbstractConnection
-
offerTask
private void offerTask(java.lang.Runnable task)
-
pollTask
private java.lang.Runnable pollTask()
-
onFlushed
public void onFlushed(long bytes) throws java.io.IOException- Specified by:
onFlushedin interfaceorg.eclipse.jetty.io.WriteFlusher.Listener- Throws:
java.io.IOException
-
-