org.glassfish.grizzly.http
Class HttpBrokenContent

java.lang.Object
  extended by org.glassfish.grizzly.http.HttpPacket
      extended by org.glassfish.grizzly.http.HttpContent
          extended by org.glassfish.grizzly.http.HttpBrokenContent
All Implemented Interfaces:
Appendable<HttpContent>, Cacheable

public class HttpBrokenContent
extends HttpContent

HttpContent message, which represents broken HTTP content. isLast() is always returns true, getContent() always throws HttpBrokenContentException().

Author:
Alexey Stashok

Nested Class Summary
static class HttpBrokenContent.Builder
          HttpTrailer message builder.
 
Field Summary
 
Fields inherited from class org.glassfish.grizzly.http.HttpContent
content, httpHeader, isLast
 
Constructor Summary
protected HttpBrokenContent(HttpHeader httpHeader)
           
 
Method Summary
static HttpBrokenContent.Builder builder(HttpHeader httpHeader)
          Returns HttpTrailer builder.
static HttpBrokenContent create()
           
static HttpBrokenContent create(HttpHeader httpHeader)
           
 Buffer getContent()
          Get the HTTP message content Buffer.
 HttpBrokenContentException getException()
          Returns HttpBrokenContentException, which describes the error.
 boolean isLast()
          Always true true for the trailer message.
 void recycle()
          
protected  void reset()
          Reset the internal state.
 
Methods inherited from class org.glassfish.grizzly.http.HttpContent
append, getHttpHeader, isBroken, isContent, isHeader, setContent, setLast
 
Methods inherited from class org.glassfish.grizzly.http.HttpPacket
isHttp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpBrokenContent

protected HttpBrokenContent(HttpHeader httpHeader)
Method Detail

create

public static HttpBrokenContent create()

create

public static HttpBrokenContent create(HttpHeader httpHeader)

builder

public static HttpBrokenContent.Builder builder(HttpHeader httpHeader)
Returns HttpTrailer builder.

Returns:
HttpBrokenContent.Builder.

getException

public HttpBrokenContentException getException()
Returns HttpBrokenContentException, which describes the error.

Returns:
HttpBrokenContentException, which describes the error.

getContent

public Buffer getContent()
Get the HTTP message content Buffer.

Overrides:
getContent in class HttpContent
Returns:
Buffer.

isLast

public final boolean isLast()
Always true true for the trailer message.

Overrides:
isLast in class HttpContent
Returns:
Always true true for the trailer message.

reset

protected void reset()
Reset the internal state.

Overrides:
reset in class HttpContent

recycle

public void recycle()

Specified by:
recycle in interface Cacheable
Overrides:
recycle in class HttpContent


Copyright © 2012 Oracle Corporation. All Rights Reserved.