|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jetty.http.AbstractGenerator
org.eclipse.jetty.http.HttpGenerator
public class HttpGenerator
HttpGenerator. Builds HTTP Messages.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.jetty.http.AbstractGenerator |
|---|
_buffer, _buffers, _content, _contentLength, _contentWritten, _date, _endp, _head, _header, _last, _method, _noContent, _persistent, _reason, _state, _status, _uri, _version, NO_BYTES, STATE_CONTENT, STATE_END, STATE_FLUSHING, STATE_HEADER |
| Fields inherited from interface org.eclipse.jetty.http.Generator |
|---|
LAST, MORE |
| Constructor Summary | |
|---|---|
HttpGenerator(Buffers buffers,
EndPoint io)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addContent(Buffer content,
boolean last)
Add content. |
boolean |
addContent(byte b)
Add content. |
void |
complete()
Complete the message. |
void |
completeHeader(HttpFields fields,
boolean allContentAdded)
|
long |
flushBuffer()
|
int |
getBytesBuffered()
|
static Buffer |
getReasonBuffer(int code)
|
boolean |
isBufferFull()
|
boolean |
isEmpty()
|
boolean |
isRequest()
|
boolean |
isResponse()
|
int |
prepareUncheckedAddContent()
Prepare buffer for unchecked writes. |
void |
reset(boolean returnBuffers)
|
void |
send1xx(int code)
|
void |
sendResponse(Buffer response)
send complete response. |
static void |
setServerVersion(java.lang.String version)
|
java.lang.String |
toString()
|
| Methods inherited from class org.eclipse.jetty.http.AbstractGenerator |
|---|
blockForOutput, completeUncheckedAddContent, flush, getContentBufferSize, getContentWritten, getSendServerVersion, getState, getUncheckedBuffer, getVersion, increaseContentBufferSize, isAllContentWritten, isCommitted, isComplete, isHead, isIdle, isOpen, isPersistent, isState, isWritten, resetBuffer, sendError, setContentLength, setDate, setHead, setPersistent, setRequest, setResponse, setSendServerVersion, setVersion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HttpGenerator(Buffers buffers,
EndPoint io)
buffers - buffer poolio - the end point to use| Method Detail |
|---|
public static Buffer getReasonBuffer(int code)
public static void setServerVersion(java.lang.String version)
public void reset(boolean returnBuffers)
reset in interface Generatorreset in class AbstractGenerator
public void addContent(Buffer content,
boolean last)
throws java.io.IOException
content - last -
java.lang.IllegalArgumentException - if content is immutable.
java.lang.IllegalStateException - If the request is not expecting any more content,
or if the buffers are full and cannot be flushed.
java.io.IOException - if there is a problem flushing the buffers.
public void sendResponse(Buffer response)
throws java.io.IOException
response -
java.io.IOException
public boolean addContent(byte b)
throws java.io.IOException
b - byte
java.io.IOException
public int prepareUncheckedAddContent()
throws java.io.IOException
prepareUncheckedAddContent in class AbstractGeneratorjava.io.IOExceptionpublic boolean isBufferFull()
isBufferFull in interface GeneratorisBufferFull in class AbstractGenerator
public void send1xx(int code)
throws java.io.IOException
java.io.IOExceptionpublic boolean isRequest()
isRequest in class AbstractGeneratorpublic boolean isResponse()
isResponse in class AbstractGenerator
public void completeHeader(HttpFields fields,
boolean allContentAdded)
throws java.io.IOException
completeHeader in interface GeneratorcompleteHeader in class AbstractGeneratorjava.io.IOException
public void complete()
throws java.io.IOException
complete in interface Generatorcomplete in class AbstractGeneratorjava.io.IOException
public long flushBuffer()
throws java.io.IOException
flushBuffer in interface GeneratorflushBuffer in class AbstractGeneratorjava.io.IOExceptionpublic int getBytesBuffered()
public boolean isEmpty()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||