public interface StreamSPI 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| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CHANNEL_ATTRIBUTE
The constant used as attribute key to store/retrieve the HTTP channel
associated with this stream
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Forcibly closes this stream.
|
Stream.Listener |
getListener() |
SessionSPI |
getSession() |
boolean |
isLocal() |
boolean |
isRemotelyClosed() |
void |
notIdle()
Marks this stream as not idle
|
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, setIdleTimeoutstatic final String CHANNEL_ATTRIBUTE
The constant used as attribute key to store/retrieve the HTTP channel associated with this stream
boolean isLocal()
SessionSPI getSession()
getSession 在接口中 StreamStream.Listener getListener()
void setListener(Stream.Listener listener)
listener - the associated with this streamvoid 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 在接口中 AutoCloseableclose 在接口中 Closeableint 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 windowvoid notIdle()
Marks this stream as not idle
boolean isRemotelyClosed()
Copyright © 2017. All rights reserved.