org.eclipse.jetty.http
类 HttpGenerator

java.lang.Object
  继承者 org.eclipse.jetty.http.AbstractGenerator
      继承者 org.eclipse.jetty.http.HttpGenerator
所有已实现的接口:
Generator

public class HttpGenerator
extends AbstractGenerator

HttpGenerator. Builds HTTP Messages.


字段摘要
protected  boolean _bypass
           
 
从类 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
 
从接口 org.eclipse.jetty.http.Generator 继承的字段
LAST, MORE
 
构造方法摘要
HttpGenerator(Buffers buffers, EndPoint io)
          Constructor.
 
方法摘要
 void addContent(Buffer content, boolean last)
          Add content.
 void complete()
          Complete the message.
 void completeHeader(HttpFields fields, boolean allContentAdded)
           
 int 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()
           
 void send1xx(int code)
           
 void sendResponse(Buffer response)
          send complete response.
static void setServerVersion(String version)
           
 String toString()
           
 
从类 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, returnBuffers, sendError, setContentLength, setDate, setHead, setPersistent, setRequest, setResponse, setSendServerVersion, setVersion
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

_bypass

protected boolean _bypass
构造方法详细信息

HttpGenerator

public HttpGenerator(Buffers buffers,
                     EndPoint io)
Constructor.

参数:
buffers - buffer pool
io - the end point to use
方法详细信息

getReasonBuffer

public static Buffer getReasonBuffer(int code)

setServerVersion

public static void setServerVersion(String version)

reset

public void reset()
指定者:
接口 Generator 中的 reset
覆盖:
AbstractGenerator 中的 reset

addContent

public void addContent(Buffer content,
                       boolean last)
                throws IOException
Add content.

参数:
content -
last -
抛出:
IllegalArgumentException - if content is immutable.
IllegalStateException - If the request is not expecting any more content, or if the buffers are full and cannot be flushed.
IOException - if there is a problem flushing the buffers.

sendResponse

public void sendResponse(Buffer response)
                  throws IOException
send complete response.

参数:
response -
抛出:
IOException

prepareUncheckedAddContent

public int prepareUncheckedAddContent()
                               throws IOException
Prepare buffer for unchecked writes. Prepare the generator buffer to receive unchecked writes

指定者:
AbstractGenerator 中的 prepareUncheckedAddContent
返回:
the available space in the buffer.
抛出:
IOException

isBufferFull

public boolean isBufferFull()
指定者:
接口 Generator 中的 isBufferFull
覆盖:
AbstractGenerator 中的 isBufferFull

send1xx

public void send1xx(int code)
             throws IOException
抛出:
IOException

isRequest

public boolean isRequest()
指定者:
AbstractGenerator 中的 isRequest

isResponse

public boolean isResponse()
指定者:
AbstractGenerator 中的 isResponse

completeHeader

public void completeHeader(HttpFields fields,
                           boolean allContentAdded)
                    throws IOException
指定者:
接口 Generator 中的 completeHeader
指定者:
AbstractGenerator 中的 completeHeader
抛出:
IOException

complete

public void complete()
              throws IOException
Complete the message.

指定者:
接口 Generator 中的 complete
覆盖:
AbstractGenerator 中的 complete
抛出:
IOException

flushBuffer

public int flushBuffer()
                throws IOException
指定者:
接口 Generator 中的 flushBuffer
指定者:
AbstractGenerator 中的 flushBuffer
抛出:
IOException

getBytesBuffered

public int getBytesBuffered()

isEmpty

public boolean isEmpty()

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2013. All Rights Reserved.