Package org.glassfish.grizzly.http
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 Summary
Fields Modifier and Type Field Description protected org.glassfish.grizzly.Buffercontentprotected HttpHeaderhttpHeaderprotected booleanlast
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpContentbuild()Build the HttpContent message.Tcontent(org.glassfish.grizzly.Buffer content)Set the HttpContent chunk contentBuffer.protected HttpContentcreate()ThttpHeader(HttpHeader httpHeader)Set theHttpHeaderassociated with this content.Tlast(boolean last)Set whether this HttpContent chunk is the last.voidreset()
-
-
-
Field Detail
-
last
protected boolean last
-
content
protected org.glassfish.grizzly.Buffer content
-
httpHeader
protected HttpHeader httpHeader
-
-
Method Detail
-
httpHeader
public final T httpHeader(HttpHeader httpHeader)
Set theHttpHeaderassociated with this content.- Parameters:
httpHeader- theHttpHeaderassociated 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 contentBuffer.- Parameters:
content- the HttpContent chunk contentBuffer.- Returns:
- Builder
-
build
public HttpContent build()
Build the HttpContent message.- Returns:
- HttpContent
-
reset
public void reset()
-
create
protected HttpContent create()
-
-