public class Stream extends Object
Modifier and Type | Field and Description |
---|---|
protected StreamStateMachine |
state |
Constructor and Description |
---|
Stream(Integer identifier,
Http2UpgradeHandler handler) |
Stream(Integer identifier,
Http2UpgradeHandler handler,
Request coyoteRequest) |
Modifier and Type | Method and Description |
---|---|
protected void |
decrementWindowSize(int decrement) |
protected void |
doNotifyAll()
Deprecated.
|
void |
emitHeader(String name,
String value)
Pass a single header to the recipient.
|
protected String |
getConnectionId() |
int |
getIdAsInt() |
Integer |
getIdentifier() |
protected int |
getWeight() |
protected long |
getWindowSize() |
protected void |
incrementWindowSize(int windowSizeIncrement)
Increment window size.
|
void |
setHeaderException(StreamException streamException)
Inform the recipient of the headers that a stream error needs to be
triggered using the given message when
validateHeaders() is
called. |
protected void |
setWindowSize(long windowSize) |
void |
validateHeaders()
Are the headers pass to the recipient so far valid?
|
protected final StreamStateMachine state
public Stream(Integer identifier, Http2UpgradeHandler handler)
public Stream(Integer identifier, Http2UpgradeHandler handler, Request coyoteRequest)
protected final void incrementWindowSize(int windowSizeIncrement) throws Http2Exception
windowSizeIncrement
- The amount by which the window size should be increasedHttp2Exception
- If the window size is now higher than
the maximum allowed@Deprecated protected void doNotifyAll()
public final void emitHeader(String name, String value) throws HpackException
name
- Header namevalue
- Header valueHpackException
- If a header is received that is not compliant
with the HTTP/2 specificationpublic void setHeaderException(StreamException streamException)
validateHeaders()
is
called. This is used when the Parser becomes aware of an error that
is not visible to the recipient.streamException
- The exception to use when resetting the streampublic void validateHeaders() throws StreamException
StreamException
- If the headers received to date are not validprotected final String getConnectionId()
protected final int getWeight()
public Integer getIdentifier()
public int getIdAsInt()
protected void setWindowSize(long windowSize)
protected long getWindowSize()
protected void decrementWindowSize(int decrement)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.