| java.lang.Object org.mortbay.jetty.AbstractGenerator
All known Subclasses: org.mortbay.jetty.HttpGenerator,
AbstractGenerator | abstract public class AbstractGenerator implements Generator(Code) | | Abstract Generator. Builds HTTP Messages.
Currently this class uses a system parameter "jetty.direct.writers" to control
two optional writer to byte conversions. buffer.writers=true will probably be
faster, but will consume more memory. This option is just for testing and tuning.
author: gregw |
Inner Class :public static class OutputWriter extends Writer | |
STATE_CONTENT | final public static int STATE_CONTENT(Code) | | |
STATE_END | final public static int STATE_END(Code) | | |
STATE_FLUSHING | final public static int STATE_FLUSHING(Code) | | |
STATE_HEADER | final public static int STATE_HEADER(Code) | | |
_close | protected boolean _close(Code) | | |
_contentBufferSize | protected int _contentBufferSize(Code) | | |
_contentLength | protected long _contentLength(Code) | | |
_contentWritten | protected long _contentWritten(Code) | | |
_head | protected boolean _head(Code) | | |
_headerBufferSize | protected int _headerBufferSize(Code) | | |
_last | protected boolean _last(Code) | | |
_noContent | protected boolean _noContent(Code) | | |
_state | protected int _state(Code) | | |
_status | protected int _status(Code) | | |
_version | protected int _version(Code) | | |
AbstractGenerator | public AbstractGenerator(Buffers buffers, EndPoint io, int headerBufferSize, int contentBufferSize)(Code) | | Constructor.
Parameters: buffers - buffer pool Parameters: headerBufferSize - Size of the buffer to allocate for HTTP header Parameters: contentBufferSize - Size of the buffer to allocate for HTTP content |
completeUncheckedAddContent | void completeUncheckedAddContent()(Code) | | |
getContentBufferSize | public int getContentBufferSize()(Code) | | Returns the contentBufferSize. |
getContentWritten | public long getContentWritten()(Code) | | Returns the contentWritten. |
getReasonBuffer | protected static Buffer getReasonBuffer(int code)(Code) | | |
getSendServerVersion | public boolean getSendServerVersion()(Code) | | |
getState | public int getState()(Code) | | |
getVersion | public int getVersion()(Code) | | |
increaseContentBufferSize | public void increaseContentBufferSize(int contentBufferSize)(Code) | | Parameters: contentBufferSize - The contentBufferSize to set. |
isBufferFull | public boolean isBufferFull()(Code) | | |
isCommitted | public boolean isCommitted()(Code) | | |
isComplete | public boolean isComplete()(Code) | | |
isContentWritten | public boolean isContentWritten()(Code) | | |
isHead | public boolean isHead()(Code) | | Returns the head. |
isIdle | public boolean isIdle()(Code) | | |
isPersistent | public boolean isPersistent()(Code) | | false if the connection should be closed after a request has been read,true if it should be used for additional requests. |
isState | public boolean isState(int state)(Code) | | |
prepareUncheckedAddContent | abstract protected int prepareUncheckedAddContent() throws IOException(Code) | | Prepare buffer for unchecked writes.
Prepare the generator buffer to receive unchecked writes
the available space in the buffer. throws: IOException - |
reset | public void reset(boolean returnBuffers)(Code) | | |
resetBuffer | public void resetBuffer()(Code) | | |
sendError | public void sendError(int code, String reason, String content, boolean close) throws IOException(Code) | | Utility method to send an error response. If the builder is not committed, this call is
equivalent to a setResponse, addcontent and complete call.
Parameters: code - Parameters: reason - Parameters: content - Parameters: close - throws: IOException - |
setContentLength | public void setContentLength(long value)(Code) | | |
setHead | public void setHead(boolean head)(Code) | | Parameters: head - The head to set. |
setPersistent | public void setPersistent(boolean persistent)(Code) | | |
setResponse | public void setResponse(int status, String reason)(Code) | | Parameters: status - The status code to send. Parameters: reason - the status message to send. |
setSendServerVersion | public void setSendServerVersion(boolean sendServerVersion)(Code) | | |
setVersion | public void setVersion(int version)(Code) | | Parameters: version - The version of the client the response is being sent to (NB. Not the versionin the response, which is the version of the server). |
uncheckedAddContent | void uncheckedAddContent(int b)(Code) | | |
|
|