Package org.eclipse.jetty.fcgi.parser
Class ResponseContentParser.ResponseParser
java.lang.Object
org.eclipse.jetty.fcgi.parser.ResponseContentParser.ResponseParser
- All Implemented Interfaces:
HttpParser.HttpHandler
,HttpParser.ResponseHandler
- Enclosing class:
ResponseContentParser
private static class ResponseContentParser.ResponseParser
extends Object
implements HttpParser.ResponseHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HttpFields
private final ResponseContentParser.FCGIHttpParser
private ClientParser.Listener
private final int
private boolean
private boolean
private ResponseContentParser.State
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ResponseParser
(ClientParser.Listener listener, int request) -
Method Summary
Modifier and TypeMethodDescriptionvoid
badMessage
(BadMessageException failure) Called to signal that a bad HTTP message has been received.boolean
content
(ByteBuffer buffer) boolean
void
earlyEOF()
Called to signal that an EOF was received unexpectedly during the parsing of an HTTP messageprotected void
int
boolean
boolean
private void
notifyBegin
(int code, String reason) private boolean
notifyContent
(ByteBuffer buffer) private void
notifyHeader
(HttpField httpField) private boolean
private void
notifyHeaders
(HttpFields fields) boolean
parse
(ByteBuffer buffer) void
parsedHeader
(HttpField httpField) This is the method called by parser when an HTTP Header name and value is foundboolean
startResponse
(HttpVersion version, int status, String reason) This is the method called by parser when the HTTP request line is parsedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.http.HttpParser.HttpHandler
badMessage, parsedTrailer
-
Field Details
-
fields
-
listener
-
request
private final int request -
httpParser
-
state
-
seenResponseCode
private boolean seenResponseCode -
stalled
private boolean stalled
-
-
Constructor Details
-
ResponseParser
-
-
Method Details
-
parse
-
getHeaderCacheSize
public int getHeaderCacheSize()- Specified by:
getHeaderCacheSize
in interfaceHttpParser.HttpHandler
- Returns:
- the size in bytes of the per parser header cache
-
startResponse
Description copied from interface:HttpParser.ResponseHandler
This is the method called by parser when the HTTP request line is parsed- Specified by:
startResponse
in interfaceHttpParser.ResponseHandler
- Parameters:
version
- the http version in usestatus
- the response statusreason
- the response reason phrase- Returns:
- true if handling parsing should return
-
parsedHeader
Description copied from interface:HttpParser.HttpHandler
This is the method called by parser when an HTTP Header name and value is found- Specified by:
parsedHeader
in interfaceHttpParser.HttpHandler
- Parameters:
httpField
- The field parsed
-
notifyBegin
-
notifyHeader
-
notifyHeaders
-
notifyHeaders
private boolean notifyHeaders() -
headerComplete
public boolean headerComplete()- Specified by:
headerComplete
in interfaceHttpParser.HttpHandler
-
content
- Specified by:
content
in interfaceHttpParser.HttpHandler
-
notifyContent
-
contentComplete
public boolean contentComplete()- Specified by:
contentComplete
in interfaceHttpParser.HttpHandler
-
messageComplete
public boolean messageComplete()- Specified by:
messageComplete
in interfaceHttpParser.HttpHandler
-
earlyEOF
public void earlyEOF()Description copied from interface:HttpParser.HttpHandler
Called to signal that an EOF was received unexpectedly during the parsing of an HTTP message- Specified by:
earlyEOF
in interfaceHttpParser.HttpHandler
-
badMessage
Description copied from interface:HttpParser.HttpHandler
Called to signal that a bad HTTP message has been received.- Specified by:
badMessage
in interfaceHttpParser.HttpHandler
- Parameters:
failure
- the failure with the bad message information
-
fail
-