public class HeaderSink extends Object
Constructor and Description |
---|
HeaderSink() |
Modifier and Type | Method and Description |
---|---|
void |
emitHeader(String name,
String value)
Pass a single header to the recipient.
|
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. |
void |
validateHeaders()
Are the headers pass to the recipient so far valid?
|
public void emitHeader(String name, String value)
name
- Header namevalue
- Header valuepublic void validateHeaders() throws StreamException
StreamException
- If the headers received to date are not validpublic 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 streamCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.