Package io.netty.handler.codec.http
Class ComposedLastHttpContent
- java.lang.Object
-
- io.netty.handler.codec.http.ComposedLastHttpContent
-
- All Implemented Interfaces:
ByteBufHolder,DecoderResultProvider,HttpContent,HttpObject,LastHttpContent,ReferenceCounted
final class ComposedLastHttpContent extends java.lang.Object implements LastHttpContent
-
-
Field Summary
Fields Modifier and Type Field Description private DecoderResultresultprivate HttpHeaderstrailingHeaders-
Fields inherited from interface io.netty.handler.codec.http.LastHttpContent
EMPTY_LAST_CONTENT
-
-
Constructor Summary
Constructors Constructor Description ComposedLastHttpContent(HttpHeaders trailingHeaders)ComposedLastHttpContent(HttpHeaders trailingHeaders, DecoderResult result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufcontent()Return the data which is held by thisByteBufHolder.LastHttpContentcopy()Creates a deep copy of thisByteBufHolder.DecoderResultdecoderResult()Returns the result of decoding this object.LastHttpContentduplicate()Duplicates thisByteBufHolder.DecoderResultgetDecoderResult()intrefCnt()Returns the reference count of this object.booleanrelease()Decreases the reference count by1and deallocates this object if the reference count reaches at0.booleanrelease(int decrement)Decreases the reference count by the specifieddecrementand deallocates this object if the reference count reaches at0.LastHttpContentreplace(ByteBuf content)Returns a newByteBufHolderwhich contains the specifiedcontent.LastHttpContentretain()Increases the reference count by1.LastHttpContentretain(int increment)Increases the reference count by the specifiedincrement.LastHttpContentretainedDuplicate()Duplicates thisByteBufHolder.voidsetDecoderResult(DecoderResult result)Updates the result of decoding this object.LastHttpContenttouch()Records the current access location of this object for debugging purposes.LastHttpContenttouch(java.lang.Object hint)Records the current access location of this object with an additional arbitrary information for debugging purposes.HttpHeaderstrailingHeaders()
-
-
-
Field Detail
-
trailingHeaders
private final HttpHeaders trailingHeaders
-
result
private DecoderResult result
-
-
Constructor Detail
-
ComposedLastHttpContent
ComposedLastHttpContent(HttpHeaders trailingHeaders)
-
ComposedLastHttpContent
ComposedLastHttpContent(HttpHeaders trailingHeaders, DecoderResult result)
-
-
Method Detail
-
trailingHeaders
public HttpHeaders trailingHeaders()
- Specified by:
trailingHeadersin interfaceLastHttpContent
-
copy
public LastHttpContent copy()
Description copied from interface:ByteBufHolderCreates a deep copy of thisByteBufHolder.- Specified by:
copyin interfaceByteBufHolder- Specified by:
copyin interfaceHttpContent- Specified by:
copyin interfaceLastHttpContent
-
duplicate
public LastHttpContent duplicate()
Description copied from interface:ByteBufHolderDuplicates thisByteBufHolder. Be aware that this will not automatically callByteBufHolder.retain().- Specified by:
duplicatein interfaceByteBufHolder- Specified by:
duplicatein interfaceHttpContent- Specified by:
duplicatein interfaceLastHttpContent
-
retainedDuplicate
public LastHttpContent retainedDuplicate()
Description copied from interface:ByteBufHolderDuplicates thisByteBufHolder. This method returns a retained duplicate unlikeByteBufHolder.duplicate().- Specified by:
retainedDuplicatein interfaceByteBufHolder- Specified by:
retainedDuplicatein interfaceHttpContent- Specified by:
retainedDuplicatein interfaceLastHttpContent- See Also:
ByteBuf.retainedDuplicate()
-
replace
public LastHttpContent replace(ByteBuf content)
Description copied from interface:ByteBufHolderReturns a newByteBufHolderwhich contains the specifiedcontent.- Specified by:
replacein interfaceByteBufHolder- Specified by:
replacein interfaceHttpContent- Specified by:
replacein interfaceLastHttpContent
-
retain
public LastHttpContent retain(int increment)
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceByteBufHolder- Specified by:
retainin interfaceHttpContent- Specified by:
retainin interfaceLastHttpContent- Specified by:
retainin interfaceReferenceCounted
-
retain
public LastHttpContent retain()
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceByteBufHolder- Specified by:
retainin interfaceHttpContent- Specified by:
retainin interfaceLastHttpContent- Specified by:
retainin interfaceReferenceCounted
-
touch
public LastHttpContent touch()
Description copied from interface:ReferenceCountedRecords 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 viaResourceLeakDetector. This method is a shortcut totouch(null).- Specified by:
touchin interfaceByteBufHolder- Specified by:
touchin interfaceHttpContent- Specified by:
touchin interfaceLastHttpContent- Specified by:
touchin interfaceReferenceCounted
-
touch
public LastHttpContent touch(java.lang.Object hint)
Description copied from interface:ReferenceCountedRecords 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 viaResourceLeakDetector.- Specified by:
touchin interfaceByteBufHolder- Specified by:
touchin interfaceHttpContent- Specified by:
touchin interfaceLastHttpContent- Specified by:
touchin interfaceReferenceCounted
-
content
public ByteBuf content()
Description copied from interface:ByteBufHolderReturn the data which is held by thisByteBufHolder.- Specified by:
contentin interfaceByteBufHolder
-
decoderResult
public DecoderResult decoderResult()
Description copied from interface:DecoderResultProviderReturns the result of decoding this object.- Specified by:
decoderResultin interfaceDecoderResultProvider
-
getDecoderResult
public DecoderResult getDecoderResult()
- Specified by:
getDecoderResultin interfaceHttpObject
-
setDecoderResult
public void setDecoderResult(DecoderResult result)
Description copied from interface:DecoderResultProviderUpdates 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.- Specified by:
setDecoderResultin interfaceDecoderResultProvider
-
refCnt
public int refCnt()
Description copied from interface:ReferenceCountedReturns the reference count of this object. If0, it means this object has been deallocated.- Specified by:
refCntin interfaceReferenceCounted
-
release
public boolean release()
Description copied from interface:ReferenceCountedDecreases the reference count by1and deallocates this object if the reference count reaches at0.- Specified by:
releasein interfaceReferenceCounted- Returns:
trueif and only if the reference count became0and this object has been deallocated
-
release
public boolean release(int decrement)
Description copied from interface:ReferenceCountedDecreases the reference count by the specifieddecrementand deallocates this object if the reference count reaches at0.- Specified by:
releasein interfaceReferenceCounted- Returns:
trueif and only if the reference count became0and this object has been deallocated
-
-