public interface IStream extends Stream, java.io.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 | Method and Description |
|---|---|
void |
close()
Forcibly closes this stream.
|
java.lang.Object |
getAttachment() |
Stream.Listener |
getListener() |
ISession |
getSession() |
boolean |
isLocal() |
boolean |
isRemotelyClosed() |
void |
notIdle()
Marks this stream as not idle so that the
idle timeout is postponed. |
void |
process(Frame frame,
Callback callback)
Processes the given
frame, belonging to this stream. |
void |
setAttachment(java.lang.Object attachment)
Attaches the given object to this stream for later retrieval.
|
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, setIdleTimeoutjava.lang.Object getAttachment()
setAttachment(Object)void setAttachment(java.lang.Object attachment)
attachment - the object to attach to this streamboolean isLocal()
ISession getSession()
getSession in interface StreamStream.Listener getListener()
Stream.Listener associated with this streamsetListener(Stream.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 java.lang.AutoCloseableclose in interface java.io.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 so that the
idle timeout is postponed.
boolean isRemotelyClosed()
Stream.isClosed()Copyright © 1995–2019 Webtide. All rights reserved.