Class HttpContent.Builder<T extends HttpContent.Builder>

java.lang.Object
org.glassfish.grizzly.http.HttpContent.Builder<T>
Direct Known Subclasses:
HttpBrokenContent.Builder, HttpTrailer.Builder
Enclosing class:
HttpContent

public static class HttpContent.Builder<T extends HttpContent.Builder> extends Object
HttpContent message builder.
  • Field Details

    • last

      protected boolean last
    • content

      protected org.glassfish.grizzly.Buffer content
    • httpHeader

      protected HttpHeader httpHeader
  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • httpHeader

      public final T httpHeader(HttpHeader httpHeader)
      Set the HttpHeader associated with this content.
      Parameters:
      httpHeader - the HttpHeader associated with this content.
      Returns:
      this.
    • last

      public final T last(boolean last)
      Set whether this HttpContent chunk is the last.
      Parameters:
      last - is this HttpContent chunk last.
      Returns:
      Builder
    • content

      public final T content(org.glassfish.grizzly.Buffer content)
      Set the HttpContent chunk content Buffer.
      Parameters:
      content - the HttpContent chunk content Buffer.
      Returns:
      Builder
    • build

      public HttpContent build()
      Build the HttpContent message.
      Returns:
      HttpContent
    • reset

      public void reset()
    • create

      protected HttpContent create()