Class QuicStreamEndPoint
- All Implemented Interfaces:
Closeable
,AutoCloseable
,EndPoint
An EndPoint
implementation on top of a QUIC stream.
The correspondent Connection
associated to this QuicStreamEndPoint
parses and generates the protocol specific bytes transported by QUIC.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.EndPoint
EndPoint.Pipe, EndPoint.SslSessionData, EndPoint.Wrapper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
int
fill
(ByteBuffer buffer) Fills the passed buffer with data from this endpoint.void
fillInterested
(Callback callback) Requests callback methods to be invoked when a call toEndPoint.fill(ByteBuffer)
would return data or EOF.boolean
flush
(ByteBuffer... buffers) Flushes data from the passed header/buffer to this endpoint.Returns the SslSessionData of a secure end point.long
boolean
protected void
void
Callback method invoked when thisEndPoint
is closed.protected void
boolean
void
void
opened()
void
shutdownInput
(long error) void
shutdownOutput
(long error) toString()
boolean
tryFillInterested
(Callback callback) Requests callback methods to be invoked when a call toEndPoint.fill(ByteBuffer)
would return data or EOF.void
write
(Callback callback, List<ByteBuffer> buffers, boolean last) Methods inherited from class org.eclipse.jetty.io.AbstractEndPoint
close, close, doClose, doShutdownInput, doShutdownOutput, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, isFillInterested, isInputShutdown, isOpen, isOutputShutdown, onClose, onIdleExpired, onOpen, reset, setConnection, shutdownInput, shutdownOutput, toConnectionString, toEndPointString, upgrade, write
Methods inherited from class org.eclipse.jetty.io.IdleTimeout
checkIdleTimeout, getIdleFor, getIdleTimeout, getScheduler, notIdle, setIdleTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.io.EndPoint
getIdleTimeout, isSecure, receive, send, setIdleTimeout, write
-
Constructor Details
-
QuicStreamEndPoint
-
-
Method Details
-
opened
public void opened() -
closed
-
getQuicSession
-
getStreamId
public long getStreamId() -
getLocalSocketAddress
- Specified by:
getLocalSocketAddress
in interfaceEndPoint
- Specified by:
getLocalSocketAddress
in classAbstractEndPoint
- Returns:
- the local SocketAddress to which this
EndPoint
is bound ornull
if thisEndPoint
is not bound to a Socket address.
-
getRemoteSocketAddress
- Specified by:
getRemoteSocketAddress
in interfaceEndPoint
- Specified by:
getRemoteSocketAddress
in classAbstractEndPoint
- Returns:
- The remote SocketAddress to which this
EndPoint
is connected, ornull
if thisEndPoint
is not connected to a Socket address.
-
isStreamFinished
public boolean isStreamFinished() -
shutdownInput
public void shutdownInput(long error) -
shutdownOutput
public void shutdownOutput(long error) -
close
-
onClose
Description copied from interface:EndPoint
Callback method invoked when this
EndPoint
is closed.- Specified by:
onClose
in interfaceEndPoint
- Overrides:
onClose
in classAbstractEndPoint
- Parameters:
failure
- The reason for the close, or null if a normal close.- See Also:
-
fill
Description copied from interface:EndPoint
Fills the passed buffer with data from this endpoint.
The bytes are appended to any data already in the buffer by writing from the buffers limit up to its capacity. The limit is updated to include the filled bytes.
- Parameters:
buffer
- The buffer to fill. The position and limit are modified during the fill. After the operation, the position is unchanged and the limit is increased to reflect the new data filled.- Returns:
- an
int
value indicating the number of bytes filled or -1 if EOF is read or the input is shutdown. - Throws:
IOException
- if the endpoint is closed.
-
flush
Description copied from interface:EndPoint
Flushes data from the passed header/buffer to this endpoint.
As many bytes as can be consumed are taken from the header/buffer position up until the buffer limit. The header/buffers position is updated to indicate how many bytes have been consumed.
- Parameters:
buffers
- the buffers to flush- Returns:
- True IFF all the buffers have been consumed and the endpoint has flushed the data to its destination (ie is not buffering any data).
- Throws:
IOException
- If the endpoint is closed or output is shutdown.
-
write
-
getTransport
- Returns:
- The underlying transport object (socket, channel, etc.)
-
getSslSessionData
Description copied from interface:EndPoint
Returns the SslSessionData of a secure end point.
- Returns:
- A
EndPoint.SslSessionData
instance (with possibly null field values) if secure, elsenull
.
-
onWritable
public void onWritable() -
onReadable
public boolean onReadable()- Returns:
- whether this endPoint is interested in reads
-
fillInterested
Description copied from interface:EndPoint
Requests callback methods to be invoked when a call to
EndPoint.fill(ByteBuffer)
would return data or EOF.- Specified by:
fillInterested
in interfaceEndPoint
- Overrides:
fillInterested
in classAbstractEndPoint
- Parameters:
callback
- the callback to call when an error occurs or we are readable. The callback may implement theInvocable
interface to self declare its blocking status. Non-blocking callbacks may be called more efficiently without dispatch delays.
-
tryFillInterested
Description copied from interface:EndPoint
Requests callback methods to be invoked when a call to
EndPoint.fill(ByteBuffer)
would return data or EOF.- Specified by:
tryFillInterested
in interfaceEndPoint
- Overrides:
tryFillInterested
in classAbstractEndPoint
- Parameters:
callback
- the callback to call when an error occurs or we are readable. The callback may implement theInvocable
interface to self declare its blocking status. Non-blocking callbacks may be called more efficiently without dispatch delays.- Returns:
- true if set
-
onIncompleteFlush
protected void onIncompleteFlush()- Specified by:
onIncompleteFlush
in classAbstractEndPoint
-
needsFillInterest
protected void needsFillInterest()- Specified by:
needsFillInterest
in classAbstractEndPoint
-
toString
- Overrides:
toString
in classAbstractEndPoint
-