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
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final intThe number of bytes for the buffer allocation of the chunk size part, 12.static final MetaData.Responsestatic final intThe default max number of bytes of the content of a transfer-encoding chunk, 1073741824. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()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) intlongintstatic byte[]getReasonBuffer(int code) Deprecated, for removal: This API element is subject to removal in a future version.getState()booleanbooleanbooleanisEnd()booleanisIdle()booleanbooleanbooleanisPersistent(HttpVersion version) booleanisState(HttpGenerator.State state) booleanstatic voidputTo(HttpField field, ByteBuffer bufferInFillMode) static voidputTo(HttpFields.Mutable fields, ByteBuffer bufferInFillMode) voidreset()voidDeprecated, for removal: This API element is subject to removal in a future version.voidsetChunkMaxLength(int chunkMaxLength) voidsetMaxHeaderBytes(int maxHeaderBytes) voidsetPersistent(boolean persistent) voidtoString()
-
Field Details
-
DEFAULT_CHUNK_MAX_LENGTH
public static final int DEFAULT_CHUNK_MAX_LENGTHThe default max number of bytes of the content of a transfer-encoding chunk, 1073741824.
- See Also:
-
CHUNK_SIZE
public static final int CHUNK_SIZEThe number of bytes for the buffer allocation of the chunk size part, 12.- See Also:
-
__STRICT
public static final boolean __STRICT -
CONTINUE_100_INFO
-
-
Constructor Details
-
HttpGenerator
public HttpGenerator()
-
-
Method Details
-
reset
public void reset() -
getMaxHeaderBytes
public int getMaxHeaderBytes() -
setMaxHeaderBytes
public void setMaxHeaderBytes(int maxHeaderBytes) -
getChunkMaxLength
public int getChunkMaxLength() -
setChunkMaxLength
public void setChunkMaxLength(int chunkMaxLength) -
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
-
startTunnel
public void startTunnel() -
servletUpgrade
Deprecated, for removal: This API element is subject to removal in a future version. -
getReasonBuffer
Deprecated, for removal: This API element is subject to removal in a future version. -
toString
-
putTo
-
putTo
-