public abstract class Parser
extends java.lang.Object
The FastCGI protocol exchanges frames.
struct frame { ubyte version; ubyte type; ushort requestId; ushort contentLength; ubyte paddingLength; ubyte reserved; ubyte[] content; ubyte[] padding; }
Depending on the type
, the content may have a different format,
so there are specialized content parsers.
HeaderParser
,
ContentParser
Modifier and Type | Class and Description |
---|---|
static interface |
Parser.Listener |
private static class |
Parser.State |
Modifier and Type | Field and Description |
---|---|
protected HeaderParser |
headerParser |
private static Logger |
LOG |
private int |
padding |
private Parser.State |
state |
Constructor and Description |
---|
Parser() |
Modifier and Type | Method and Description |
---|---|
protected abstract ContentParser |
findContentParser(FCGI.FrameType frameType) |
boolean |
parse(java.nio.ByteBuffer buffer) |
private void |
reset() |
private static final Logger LOG
protected final HeaderParser headerParser
private Parser.State state
private int padding
public boolean parse(java.nio.ByteBuffer buffer)
buffer
- the bytes to parseprotected abstract ContentParser findContentParser(FCGI.FrameType frameType)
private void reset()