public interface IStream extends Stream, Closeable
The SPI interface for implementing a HTTP/2 stream.
This class extends Stream
by adding the methods required to
implement the HTTP/2 stream functionalities.
Stream.Listener
Modifier and Type | Field and Description |
---|---|
static String |
CHANNEL_ATTRIBUTE
The constant used as attribute key to store/retrieve the HTTP
channel associated with this stream
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Forcibly closes this stream.
|
Stream.Listener |
getListener() |
ISession |
getSession() |
void |
process(Frame frame,
Callback callback)
Processes the given
frame , belonging to this stream. |
void |
setListener(Stream.Listener listener) |
boolean |
updateClose(boolean update,
boolean local)
Updates the close state of this stream.
|
int |
updateRecvWindow(int delta)
Updates the stream receive window by the given
delta . |
int |
updateSendWindow(int delta)
Updates the stream send window by the given
delta . |
data, getAttribute, getId, getIdleTimeout, headers, isClosed, isReset, push, removeAttribute, reset, setAttribute, setIdleTimeout
static final String CHANNEL_ATTRIBUTE
The constant used as attribute key to store/retrieve the HTTP channel associated with this stream
Stream.setAttribute(String, Object)
ISession getSession()
getSession
in interface Stream
Stream.Listener getListener()
Stream.Listener
associated with this stream#setListener(Listener)
void setListener(Stream.Listener listener)
listener
- the Stream.Listener
associated with this streamgetListener()
void process(Frame frame, Callback callback)
Processes the given frame
, belonging to this stream.
frame
- the frame to processcallback
- the callback to complete when frame has been processedboolean updateClose(boolean update, boolean local)
Updates the close state of this stream.
update
- whether to update the close statelocal
- whether the update comes from a local operation
(such as sending a frame that ends the stream)
or a remote operation (such as receiving a framevoid close()
Forcibly closes this stream.
close
in interface AutoCloseable
close
in interface Closeable
int updateSendWindow(int delta)
Updates the stream send window by the given delta
.
delta
- the delta value (positive or negative) to add to the stream send windowint updateRecvWindow(int delta)
Updates the stream receive window by the given delta
.
delta
- the delta value (positive or negative) to add to the stream receive windowCopyright © 1995-2015 Webtide. All Rights Reserved.