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,
CloseState.Event event)
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
java.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 Stream
Stream.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, CloseState.Event event)
Updates the close state of this stream.
update
- whether to update the close stateevent
- the event that caused the close state updatevoid close()
Forcibly closes this stream.
close
in interface java.lang.AutoCloseable
close
in interface java.io.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 windowvoid notIdle()
Marks this stream as not idle so that the
idle timeout
is postponed.
boolean isRemotelyClosed()
Stream.isClosed()
Copyright © 1995–2023 Webtide. All rights reserved.