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
-
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
int
static byte[]
getReasonBuffer
(int code) Deprecated, for removal: This API element is subject to removal in a future version.getState()
boolean
boolean
boolean
isEnd()
boolean
isIdle()
boolean
boolean
boolean
isPersistent
(HttpVersion version) boolean
isState
(HttpGenerator.State state) boolean
static void
putTo
(HttpField field, ByteBuffer bufferInFillMode) static void
putTo
(HttpFields.Mutable fields, ByteBuffer bufferInFillMode) void
reset()
void
void
setMaxHeaderBytes
(int maxHeaderBytes) void
setPersistent
(boolean persistent) toString()
-
Field Details
-
__STRICT
public static final boolean __STRICT -
CONTINUE_100_INFO
-
CHUNK_SIZE
public static final int CHUNK_SIZE- See Also:
-
-
Constructor Details
-
HttpGenerator
public HttpGenerator()
-
-
Method Details
-
reset
public void reset() -
getMaxHeaderBytes
public int getMaxHeaderBytes() -
setMaxHeaderBytes
public void setMaxHeaderBytes(int maxHeaderBytes) -
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
-
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
Deprecated, for removal: This API element is subject to removal in a future version. -
toString
-
putTo
-
putTo
-