public class ServerGenerator extends Generator
Generator.Result
Modifier and Type | Field and Description |
---|---|
private static byte[] |
COLON |
private static byte[] |
EOL |
private boolean |
sendStatus200 |
private static byte[] |
STATUS |
byteBufferPool, MAX_CONTENT_LENGTH
Constructor and Description |
---|
ServerGenerator(ByteBufferPool byteBufferPool) |
ServerGenerator(ByteBufferPool byteBufferPool,
boolean sendStatus200) |
Modifier and Type | Method and Description |
---|---|
private java.nio.ByteBuffer |
generateEndRequest(int request,
boolean aborted) |
Generator.Result |
generateResponseContent(int request,
java.nio.ByteBuffer content,
boolean lastContent,
boolean aborted,
Callback callback) |
Generator.Result |
generateResponseHeaders(int request,
int code,
java.lang.String reason,
HttpFields fields,
Callback callback) |
generateContent
private static final byte[] STATUS
private static final byte[] COLON
private static final byte[] EOL
private final boolean sendStatus200
public ServerGenerator(ByteBufferPool byteBufferPool)
public ServerGenerator(ByteBufferPool byteBufferPool, boolean sendStatus200)
public Generator.Result generateResponseHeaders(int request, int code, java.lang.String reason, HttpFields fields, Callback callback)
public Generator.Result generateResponseContent(int request, java.nio.ByteBuffer content, boolean lastContent, boolean aborted, Callback callback)
private java.nio.ByteBuffer generateEndRequest(int request, boolean aborted)