Top Description Constructors Methods
org.apache.coyote.http2

pack-priv Class HeaderSink

extends Object
implements HeaderEmitter
Class Inheritance
All Implemented Interfaces
org.apache.coyote.http2.HpackDecoder.HeaderEmitter
Imports
org.apache.coyote.http2.HpackDecoder.HeaderEmitter

Purpose of this class is to silently swallow any headers. It is used once the connection close process has started if headers for new streams are received.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
emitHeader(String
Header name
name
,
String
Header value
value
)

Implements org.apache.coyote.http2.HpackDecoder.HeaderEmitter.emitHeader.

Pass a single header to the recipient.

public void
setHeaderException(StreamException
The exception to use when resetting the stream
streamException
)

Implements org.apache.coyote.http2.HpackDecoder.HeaderEmitter.setHeaderException.

Inform the recipient of the headers that a stream error needs to be triggered using the given message when validateHeaders() is called.

public void
validateHeaders()

Implements org.apache.coyote.http2.HpackDecoder.HeaderEmitter.validateHeaders.

Are the headers pass to the recipient so far valid?

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HeaderSinkback to summary
pack-priv HeaderSink()

Method Detail

emitHeaderback to summary
public void emitHeader(String name, String value)

Implements org.apache.coyote.http2.HpackDecoder.HeaderEmitter.emitHeader.

Doc from org.apache.coyote.http2.HpackDecoder.HeaderEmitter.emitHeader.

Pass a single header to the recipient.

Parameters
name:String

Header name

value:String

Header value

Annotations
@Override
setHeaderExceptionback to summary
public void setHeaderException(StreamException streamException)

Implements org.apache.coyote.http2.HpackDecoder.HeaderEmitter.setHeaderException.

Doc from org.apache.coyote.http2.HpackDecoder.HeaderEmitter.setHeaderException.

Inform the recipient of the headers that a stream error needs to be triggered using the given message when validateHeaders() is called. This is used when the Parser becomes aware of an error that is not visible to the recipient.

Parameters
streamException:StreamException

The exception to use when resetting the stream

Annotations
@Override
validateHeadersback to summary
public void validateHeaders() throws StreamException

Implements org.apache.coyote.http2.HpackDecoder.HeaderEmitter.validateHeaders.

Doc from org.apache.coyote.http2.HpackDecoder.HeaderEmitter.validateHeaders.

Are the headers pass to the recipient so far valid? The decoder needs to process all the headers to maintain state even if there is a problem. In addition, it is easy for the the intended recipient to track if the complete set of headers is valid since to do that state needs to be maintained between the parsing of the initial headers and the parsing of any trailer headers. The recipient is the best place to maintain that state.

Annotations
@Override
Exceptions
StreamException:
If the headers received to date are not valid