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
Nested ClassesModifier and TypeClassDescriptionstatic enumThe result of the frame content parsing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected intbooleanInvoked by theParserwhen the frame content length is zero.abstract ContentParser.Resultparse(ByteBuffer buffer) Parses the bytes in the givenbufferas FastCGI frame content bytes.
-
Constructor Details
-
ContentParser
-
-
Method Details
-
parse
Parses the bytes in the given
bufferas FastCGI frame content bytes.- Parameters:
buffer- the bytes to parse- Returns:
- the result of the parsing
-
noContent
public boolean noContent()Invoked by the
Parserwhen the frame content length is zero.- Returns:
- whether the parsing should stop
-
getRequest
protected int getRequest() -
getContentLength
protected int getContentLength()
-