Package org.eclipse.jetty.http
Class HttpGenerator
java.lang.Object
org.eclipse.jetty.http.HttpGenerator
HttpGenerator. Builds HTTP Messages.
If the system property "org.eclipse.jetty.http.HttpGenerator.STRICT" is set to true, then the generator will strictly pass on the exact strings received from methods and header fields. Otherwise a fast case insensitive string lookup is used that may alter the case and white space of some methods/headers
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
static final int
static final MetaData.Response
static final MetaData.Response
static final MetaData.Response
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
generateRequest
(MetaData.Request info, ByteBuffer header, ByteBuffer chunk, ByteBuffer content, boolean last) generateResponse
(MetaData.Response info, boolean head, ByteBuffer header, ByteBuffer chunk, ByteBuffer content, boolean last) long
static byte[]
getReasonBuffer
(int code) getState()
boolean
boolean
boolean
isEnd()
boolean
isIdle()
boolean
boolean
boolean
isState
(HttpGenerator.State state) boolean
static void
putTo
(HttpField field, ByteBuffer bufferInFillMode) static void
putTo
(HttpFields.Mutable fields, ByteBuffer bufferInFillMode) void
reset()
void
static void
setJettyVersion
(String serverVersion) void
setPersistent
(boolean persistent) toString()
-
Field Details
-
__STRICT
public static final boolean __STRICT -
CONTINUE_100_INFO
-
PROGRESS_102_INFO
-
RESPONSE_500_INFO
-
CHUNK_SIZE
public static final int CHUNK_SIZE- See Also:
-
-
Constructor Details
-
HttpGenerator
public HttpGenerator() -
HttpGenerator
public HttpGenerator(boolean sendServerVersion, boolean sendXPoweredBy)
-
-
Method Details
-
setJettyVersion
-
reset
public void reset() -
getState
-
isState
-
isIdle
public boolean isIdle() -
isEnd
public boolean isEnd() -
isCommitted
public boolean isCommitted() -
isChunking
public boolean isChunking() -
isNoContent
public boolean isNoContent() -
setPersistent
public void setPersistent(boolean persistent) -
isPersistent
public boolean isPersistent()- Returns:
- true if known to be persistent
-
isWritten
public boolean isWritten() -
getContentPrepared
public long getContentPrepared() -
abort
public void abort() -
generateRequest
public HttpGenerator.Result generateRequest(MetaData.Request info, ByteBuffer header, ByteBuffer chunk, ByteBuffer content, boolean last) throws IOException - Throws:
IOException
-
generateResponse
public HttpGenerator.Result generateResponse(MetaData.Response info, boolean head, ByteBuffer header, ByteBuffer chunk, ByteBuffer content, boolean last) throws IOException - Throws:
IOException
-
servletUpgrade
public void servletUpgrade() -
getReasonBuffer
public static byte[] getReasonBuffer(int code) -
toString
-
putTo
-
putTo
-