Package org.eclipse.jetty.http2
Interface IStream
-
- All Superinterfaces:
AutoCloseable,Closeable,Stream
- All Known Implementing Classes:
HTTP2Stream
public interface IStream extends Stream, Closeable
The SPI interface for implementing a HTTP/2 stream.
This class extends
Streamby adding the methods required to implement the HTTP/2 stream functionalities.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.http2.api.Stream
Stream.Listener
-
-
Field Summary
Fields Modifier and Type Field Description static StringCHANNEL_ATTRIBUTEThe constant used as attribute key to store/retrieve the HTTP channel associated with this stream
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Forcibly closes this stream.Stream.ListenergetListener()ISessiongetSession()booleanisLocal()voidnotIdle()Marks this stream as not idle so that theidle timeoutis postponed.voidprocess(Frame frame, org.eclipse.jetty.util.Callback callback)Processes the givenframe, belonging to this stream.voidsetListener(Stream.Listener listener)booleanupdateClose(boolean update, boolean local)Updates the close state of this stream.intupdateRecvWindow(int delta)Updates the stream receive window by the givendelta.intupdateSendWindow(int delta)Updates the stream send window by the givendelta.-
Methods inherited from interface org.eclipse.jetty.http2.api.Stream
data, getAttribute, getId, getIdleTimeout, headers, isClosed, isReset, push, removeAttribute, reset, setAttribute, setIdleTimeout
-
-
-
-
Field Detail
-
CHANNEL_ATTRIBUTE
static final String CHANNEL_ATTRIBUTE
The constant used as attribute key to store/retrieve the HTTP channel associated with this stream
- See Also:
Stream.setAttribute(String, Object)
-
-
Method Detail
-
isLocal
boolean isLocal()
- Returns:
- whether this stream is local or remote
-
getSession
ISession getSession()
- Specified by:
getSessionin interfaceStream- Returns:
- the session this stream is associated to
-
getListener
Stream.Listener getListener()
- Returns:
- the
Stream.Listenerassociated with this stream - See Also:
setListener(Listener)
-
setListener
void setListener(Stream.Listener listener)
- Parameters:
listener- theStream.Listenerassociated with this stream- See Also:
getListener()
-
process
void process(Frame frame, org.eclipse.jetty.util.Callback callback)
Processes the given
frame, belonging to this stream.- Parameters:
frame- the frame to processcallback- the callback to complete when frame has been processed
-
updateClose
boolean updateClose(boolean update, boolean local)Updates the close state of this stream.
- Parameters:
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 frame- Returns:
- whether the stream has been fully closed by this invocation
-
close
void close()
Forcibly closes this stream.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
updateSendWindow
int updateSendWindow(int delta)
Updates the stream send window by the given
delta.- Parameters:
delta- the delta value (positive or negative) to add to the stream send window- Returns:
- the previous value of the stream send window
-
updateRecvWindow
int updateRecvWindow(int delta)
Updates the stream receive window by the given
delta.- Parameters:
delta- the delta value (positive or negative) to add to the stream receive window- Returns:
- the previous value of the stream receive window
-
notIdle
void notIdle()
Marks this stream as not idle so that the
idle timeoutis postponed.
-
-