org.eclipse.jetty.ajp

## Class Ajp13Generator

- java.lang.Object
- - org.eclipse.jetty.http.AbstractGenerator
  - - org.eclipse.jetty.ajp.Ajp13Generator

- All Implemented Interfaces:
    Generator

      public class Ajp13Generator
      extends AbstractGenerator

- - ### 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

    Constructors
    Constructor and Description
    `Ajp13Generator(Buffers buffers, EndPoint io)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addContent(Buffer content, boolean last)` Add content.
    `void` | `complete()` Complete the message.
    `void` | `completeHeader(HttpFields fields, boolean allContentAdded)`
    `int` | `flushBuffer()`
    `void` | `getBodyChunk()`
    `int` | `getContentBufferSize()`
    `void` | `gotBody()`
    `void` | `increaseContentBufferSize(int contentBufferSize)`
    `boolean` | `isComplete()`
    `boolean` | `isRequest()`
    `boolean` | `isResponse()`
    `int` | `prepareUncheckedAddContent()` Prepare buffer for unchecked writes.
    `void` | `reset()`
    `void` | `sendCPong()`
    `static void` | `setServerVersion(String version)`

    - ### Methods inherited from class org.eclipse.jetty.http.AbstractGenerator

      `blockForOutput, completeUncheckedAddContent, flush, getContentWritten, getSendServerVersion, getState, getUncheckedBuffer, getVersion, isAllContentWritten, isBufferFull, isCommitted, isHead, isIdle, isOpen, isPersistent, isState, isWritten, resetBuffer, returnBuffers, sendError, setContentLength, setDate, setHead, setPersistent, setRequest, setResponse, setSendServerVersion, setVersion`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Ajp13Generator

          public Ajp13Generator(Buffers buffers,
                        EndPoint io)

  - ### Method Detail

    - #### setServerVersion

          public static void setServerVersion(String version)

    - #### isRequest

          public boolean isRequest()

      Specified by:
        `isRequest` in class `AbstractGenerator`

    - #### isResponse

          public boolean isResponse()

      Specified by:
        `isResponse` in class `AbstractGenerator`

    - #### reset

          public void reset()

      Specified by:
        `reset` in interface `Generator`
      Overrides:
        `reset` in class `AbstractGenerator`

    - #### getContentBufferSize

          public int getContentBufferSize()

      Specified by:
        `getContentBufferSize` in interface `Generator`
      Overrides:
        `getContentBufferSize` in class `AbstractGenerator`
      Returns:
        Returns the contentBufferSize.

    - #### increaseContentBufferSize

          public void increaseContentBufferSize(int contentBufferSize)

      Specified by:
        `increaseContentBufferSize` in interface `Generator`
      Overrides:
        `increaseContentBufferSize` in class `AbstractGenerator`
      Parameters:
        `contentBufferSize` - The contentBufferSize to set.

    - #### addContent

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

      Add content.
      Parameters:
        `content` -
        `last` -
      Throws:
        `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.

    - #### prepareUncheckedAddContent

          public int prepareUncheckedAddContent()
                                         throws IOException

      Prepare buffer for unchecked writes. Prepare the generator buffer to receive unchecked writes
      Specified by:
        `prepareUncheckedAddContent` in class `AbstractGenerator`
      Returns:
        the available space in the buffer.
      Throws:
        `IOException`

    - #### completeHeader

          public void completeHeader(HttpFields fields,
                            boolean allContentAdded)
                              throws IOException

      Specified by:
        `completeHeader` in interface `Generator`
      Specified by:
        `completeHeader` in class `AbstractGenerator`
      Throws:
        `IOException`

    - #### complete

          public void complete()
                        throws IOException

      Complete the message.
      Specified by:
        `complete` in interface `Generator`
      Overrides:
        `complete` in class `AbstractGenerator`
      Throws:
        `IOException`

    - #### flushBuffer

          public int flushBuffer()
                          throws IOException

      Specified by:
        `flushBuffer` in interface `Generator`
      Specified by:
        `flushBuffer` in class `AbstractGenerator`
      Throws:
        `IOException`

    - #### isComplete

          public boolean isComplete()

      Specified by:
        `isComplete` in interface `Generator`
      Overrides:
        `isComplete` in class `AbstractGenerator`

    - #### getBodyChunk

          public void getBodyChunk()
                            throws IOException

      Throws:
        `IOException`

    - #### gotBody

          public void gotBody()

    - #### sendCPong

          public void sendCPong()
                         throws IOException

      Throws:
        `IOException`

Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.