Top Description Fields Constructors Methods
io.vertx.core.http.impl

pack-priv Class AssembledHttpResponse

extends Object
implements HttpResponse, HttpContent
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.http.HttpContent, io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted, io.netty.handler.codec.http.HttpObject, io.netty.handler.codec.DecoderResultProvider, io.netty.handler.codec.http.HttpResponse, io.netty.handler.codec.http.HttpMessage
Known Direct Subclasses
io.vertx.core.http.impl.AssembledFullHttpResponse
Imports
io.netty.buffer.ByteBuf, .Unpooled, io.netty.handler.codec.DecoderResult, io.netty.handler.codec.http.*

Helper wrapper class which allows to assemble a HttpContent and a HttpResponse into one "packet" and so more efficient write it through the pipeline.
Author
Norman Maurer

Field Summary

Modifier and TypeField and Description
private final ByteBuf
private boolean
private HttpHeaders
private DecoderResult
private HttpResponseStatus
private HttpVersion

Constructor Summary

AccessConstructor and Description
pack-priv
AssembledHttpResponse(boolean head, HttpVersion version, HttpResponseStatus status, HttpHeaders headers)

pack-priv
AssembledHttpResponse(boolean head, HttpVersion version, HttpResponseStatus status, HttpHeaders headers, ByteBuf content)

Method Summary

Modifier and TypeMethod and Description
public ByteBuf
content()

Implements io.netty.buffer.ByteBufHolder.content.

Return the data which is held by this ByteBufHolder.

public HttpContent
copy()

Implements io.netty.handler.codec.http.HttpContent.copy.

Creates a deep copy of this ByteBufHolder.

public DecoderResult
decoderResult()

Implements io.netty.handler.codec.DecoderResultProvider.decoderResult.

Returns the result of decoding this object.

public HttpContent
public DecoderResult
public HttpVersion
public HttpResponseStatus
pack-priv boolean
head()

public HttpHeaders
headers()

Implements io.netty.handler.codec.http.HttpMessage.headers.

Returns the headers of this message.

public HttpVersion
public int
refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object.

public boolean
release()

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.

public boolean
release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.

public HttpContent
replace(ByteBuf content)

Implements io.netty.handler.codec.http.HttpContent.replace.

Returns a new ByteBufHolder which contains the specified content.

public AssembledHttpResponse
retain()

Implements io.netty.handler.codec.http.HttpContent.retain.

Increases the reference count by 1.

public AssembledHttpResponse
retain(int increment)

Implements io.netty.handler.codec.http.HttpContent.retain.

Increases the reference count by the specified increment.

public HttpContent
public void
setDecoderResult(DecoderResult result)

Implements io.netty.handler.codec.DecoderResultProvider.setDecoderResult.

Updates the result of decoding this object.

public AssembledHttpResponse
public AssembledHttpResponse
public HttpResponseStatus
status()

Implements io.netty.handler.codec.http.HttpResponse.status.

Returns the status of this HttpResponse.

public AssembledHttpResponse
touch()

Implements io.netty.handler.codec.http.HttpContent.touch.

Records the current access location of this object for debugging purposes.

public AssembledHttpResponse
touch(Object hint)

Implements io.netty.handler.codec.http.HttpContent.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentback to summary
private final ByteBuf content
headersback to summary
private HttpHeaders headers
resultback to summary
private DecoderResult result
statusback to summary
private HttpResponseStatus status
versionback to summary
private HttpVersion version

Constructor Detail

AssembledHttpResponseback to summary
pack-priv AssembledHttpResponse(boolean head, HttpVersion version, HttpResponseStatus status, HttpHeaders headers)
AssembledHttpResponseback to summary
pack-priv AssembledHttpResponse(boolean head, HttpVersion version, HttpResponseStatus status, HttpHeaders headers, ByteBuf content)

Method Detail

contentback to summary
public ByteBuf content()

Implements io.netty.buffer.ByteBufHolder.content.

Doc from io.netty.buffer.ByteBufHolder.content.

Return the data which is held by this ByteBufHolder.

Annotations
@Override
copyback to summary
public HttpContent copy()

Implements io.netty.handler.codec.http.HttpContent.copy.

Doc from io.netty.buffer.ByteBufHolder.copy.

Creates a deep copy of this ByteBufHolder.

Annotations
@Override
decoderResultback to summary
public DecoderResult decoderResult()

Implements io.netty.handler.codec.DecoderResultProvider.decoderResult.

Doc from io.netty.handler.codec.DecoderResultProvider.decoderResult.

Returns the result of decoding this object.

Annotations
@Override
duplicateback to summary
public HttpContent duplicate()

Implements io.netty.handler.codec.http.HttpContent.duplicate.

Doc from io.netty.buffer.ByteBufHolder.duplicate.

Duplicates this ByteBufHolder. Be aware that this will not automatically call retain().

Annotations
@Override
getDecoderResultback to summary
public DecoderResult getDecoderResult()

Implements io.netty.handler.codec.http.HttpObject.getDecoderResult.

Annotations
@Override
getProtocolVersionback to summary
public HttpVersion getProtocolVersion()

Implements io.netty.handler.codec.http.HttpMessage.getProtocolVersion.

Annotations
@Override
getStatusback to summary
public HttpResponseStatus getStatus()

Implements io.netty.handler.codec.http.HttpResponse.getStatus.

Annotations
@Override
headback to summary
pack-priv boolean head()
headersback to summary
public HttpHeaders headers()

Implements io.netty.handler.codec.http.HttpMessage.headers.

Doc from io.netty.handler.codec.http.HttpMessage.headers.

Returns the headers of this message.

Annotations
@Override
protocolVersionback to summary
public HttpVersion protocolVersion()

Implements io.netty.handler.codec.http.HttpMessage.protocolVersion.

Doc from io.netty.handler.codec.http.HttpMessage.protocolVersion.

Returns the protocol version of this HttpMessage

Annotations
@Override
refCntback to summary
public int refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Doc from io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object. If 0, it means this object has been deallocated.

Annotations
@Override
releaseback to summary
public boolean release()

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
releaseback to summary
public boolean release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
replaceback to summary
public HttpContent replace(ByteBuf content)

Implements io.netty.handler.codec.http.HttpContent.replace.

Doc from io.netty.buffer.ByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.

Annotations
@Override
retainback to summary
public AssembledHttpResponse retain()

Implements io.netty.handler.codec.http.HttpContent.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public AssembledHttpResponse retain(int increment)

Implements io.netty.handler.codec.http.HttpContent.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
retainedDuplicateback to summary
public HttpContent retainedDuplicate()

Implements io.netty.handler.codec.http.HttpContent.retainedDuplicate.

Doc from io.netty.buffer.ByteBufHolder.retainedDuplicate.

Duplicates this ByteBufHolder. This method returns a retained duplicate unlike duplicate().

Annotations
@Override
setDecoderResultback to summary
public void setDecoderResult(DecoderResult result)

Implements io.netty.handler.codec.DecoderResultProvider.setDecoderResult.

Doc from io.netty.handler.codec.DecoderResultProvider.setDecoderResult.

Updates the result of decoding this object. This method is supposed to be invoked by a decoder. Do not call this method unless you know what you are doing.

Annotations
@Override
setProtocolVersionback to summary
public AssembledHttpResponse setProtocolVersion(HttpVersion version)

Implements io.netty.handler.codec.http.HttpResponse.setProtocolVersion.

Doc from io.netty.handler.codec.http.HttpMessage.setProtocolVersion.

Set the protocol version of this HttpMessage

Annotations
@Override
setStatusback to summary
public AssembledHttpResponse setStatus(HttpResponseStatus status)

Implements io.netty.handler.codec.http.HttpResponse.setStatus.

Doc from io.netty.handler.codec.http.HttpResponse.setStatus.

Set the status of this HttpResponse.

Annotations
@Override
statusback to summary
public HttpResponseStatus status()

Implements io.netty.handler.codec.http.HttpResponse.status.

Doc from io.netty.handler.codec.http.HttpResponse.status.

Returns the status of this HttpResponse.

Returns:HttpResponseStatus

The HttpResponseStatus of this HttpResponse

Annotations
@Override
touchback to summary
public AssembledHttpResponse touch()

Implements io.netty.handler.codec.http.HttpContent.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public AssembledHttpResponse touch(Object hint)

Implements io.netty.handler.codec.http.HttpContent.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.

Annotations
@Override