Package org.eclipse.jetty.fcgi.parser
Class ContentParser
java.lang.Object
org.eclipse.jetty.fcgi.parser.ContentParser
- Direct Known Subclasses:
BeginRequestContentParser
,EndRequestContentParser
,ParamsContentParser
,StreamContentParser
Parser for FastCGI frame content.
Depending on the frame type specified in the FastCGI frame header, the FastCGI frame content has different formats and it is parsed by different implementation of this abstract class.
There are these frame content types:
BEGIN_REQUEST
, to signal the begin of the requestPARAMS
, key/value pairsSTDIN
, the request body, handled as a streamSTDOUT
, the response body, handled as a streamSTDERR
, the response error, handled as a streamEND_REQUEST
, to signal the end of the response
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The result of the frame content parsing. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
protected int
boolean
Invoked by theParser
when the frame content length is zero.abstract ContentParser.Result
parse
(ByteBuffer buffer) Parses the bytes in the givenbuffer
as FastCGI frame content bytes.
-
Constructor Details
-
ContentParser
-
-
Method Details
-
parse
Parses the bytes in the given
buffer
as FastCGI frame content bytes.- Parameters:
buffer
- the bytes to parse- Returns:
- the result of the parsing
-
noContent
public boolean noContent()Invoked by the
Parser
when the frame content length is zero.- Returns:
- whether the parsing should stop
-
getRequest
protected int getRequest() -
getContentLength
protected int getContentLength()
-