HttpRequests, HttpResponses, and HttpContents
into SpdySynStreamFrames and SpdySynReplyFrames.
HttpRequests:
| Header Name | Header Value |
|---|---|
"X-SPDY-Stream-ID" |
The Stream-ID for this request. Stream-IDs must be odd, positive integers, and must increase monotonically. |
"X-SPDY-Priority" |
The priority value for this request. The priority should be between 0 and 7 inclusive. 0 represents the highest priority and 7 represents the lowest. This header is optional and defaults to 0. |
HttpResponses:
| Header Name | Header Value |
|---|---|
"X-SPDY-Stream-ID" |
The Stream-ID of the request corresponding to this response. |
HttpRequests:
| Header Name | Header Value |
|---|---|
"X-SPDY-Stream-ID" |
The Stream-ID for this resource. Stream-IDs must be even, positive integers, and must increase monotonically. |
"X-SPDY-Associated-To-Stream-ID" |
The Stream-ID of the request that initiated this pushed resource. |
"X-SPDY-Priority" |
The priority value for this resource. The priority should be between 0 and 7 inclusive. 0 represents the highest priority and 7 represents the lowest. This header is optional and defaults to 0. |
"X-SPDY-Scheme" header but otherwise
defaults to "https" as that is the most common SPDY deployment.
HttpContents that it receives
with the most recently received 'chunked' HttpRequest
or HttpResponse.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final boolean | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | SpdyHttpEncoder(SpdyVersion
the protocol version version, boolean convert header names to lowercase. In a controlled environment,
one can disable the conversion. headersToLowerCase, boolean validate the header names and values when adding them to the validateHeaders)SpdyHeadersCreates a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| private SpdyHeadersFrame | |
| private SpdySynStreamFrame | |
| protected void | encode(ChannelHandlerContext
the ctx, HttpObject ChannelHandlerContext which this MessageToMessageEncoder belongs tothe message to encode to an other one msg, List<Object> the out)List into which the encoded msg should be added
needs to do some kind of aggregationImplements abstract io. |
| private static boolean | Returns: whether the given HTTP message should generate a last SPDY frame.check this HTTP message httpMessage)Checks if the given HTTP message should be considered as a last SPDY frame. |
| currentStreamId | back to summary |
|---|---|
| private int currentStreamId | |
| headersToLowerCase | back to summary |
|---|---|
| private final boolean headersToLowerCase | |
| validateHeaders | back to summary |
|---|---|
| private final boolean validateHeaders | |
| SpdyHttpEncoder | back to summary |
|---|---|
| public SpdyHttpEncoder(SpdyVersion version) Creates a new instance.
| |
| SpdyHttpEncoder | back to summary |
|---|---|
| public SpdyHttpEncoder(SpdyVersion version, boolean headersToLowerCase, boolean validateHeaders) Creates a new instance.
| |
| createHeadersFrame | back to summary |
|---|---|
private SpdyHeadersFrame createHeadersFrame(HttpResponse httpResponse) throws Exception
| |
| createSynStreamFrame | back to summary |
|---|---|
private SpdySynStreamFrame createSynStreamFrame(HttpRequest httpRequest) throws Exception
| |
| encode | back to summary |
|---|---|
| protected void encode(ChannelHandlerContext ctx, HttpObject msg, List<Object> out) throws Exception Implements abstract io. Doc from io. Encode from one message to an other. This method will be called for each written message that can be handled by this encoder.
| |
| isLast | back to summary |
|---|---|
| private static boolean isLast(HttpMessage httpMessage) Checks if the given HTTP message should be considered as a last SPDY frame.
| |