- java.lang.Object
-
- io.netty5.handler.codec.http.EmptyLastHttpContent
-
- All Implemented Interfaces:
DecoderResultProvider,HttpContent<EmptyLastHttpContent>,HttpObject,LastHttpContent<EmptyLastHttpContent>,Resource<EmptyLastHttpContent>,AutoCloseable
public final class EmptyLastHttpContent extends Object implements LastHttpContent<EmptyLastHttpContent>
-
-
Constructor Summary
Constructors Constructor Description EmptyLastHttpContent(BufferAllocator allocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the resource, making it inaccessible.EmptyLastHttpContentcopy()Create a copy of this HTTP content instance, and return it.DecoderResultdecoderResult()Returns the result of decoding this object.booleanequals(Object o)inthashCode()booleanisAccessible()Check if this object is accessible.Bufferpayload()Returns theBufferrepresenting the payload of the HTTP message.Send<EmptyLastHttpContent>send()Send this object instance to another Thread, transferring the ownership to the recipient.voidsetDecoderResult(DecoderResult result)Updates the result of decoding this object.StringtoString()EmptyLastHttpContenttouch(Object hint)Record the current access location for debugging purposes.HttpHeaderstrailingHeaders()
-
-
-
Constructor Detail
-
EmptyLastHttpContent
public EmptyLastHttpContent(BufferAllocator allocator)
-
-
Method Detail
-
payload
public Buffer payload()
Description copied from interface:HttpContentReturns theBufferrepresenting the payload of the HTTP message.- Specified by:
payloadin interfaceHttpContent<EmptyLastHttpContent>- Returns:
- The
Bufferrepresenting the payload of the HTTP message.
-
copy
public EmptyLastHttpContent copy()
Description copied from interface:HttpContentCreate a copy of this HTTP content instance, and return it.- Specified by:
copyin interfaceHttpContent<EmptyLastHttpContent>- Returns:
- A copy of this HTTP content object.
-
send
public Send<EmptyLastHttpContent> send()
Description copied from interface:ResourceSend this object instance to another Thread, transferring the ownership to the recipient.The object must be in a state where it can be sent, which includes at least being accessible.
When sent, this instance will immediately become inaccessible, as if by closing it. All attempts at accessing an object that has been sent, even if that object has not yet been received, should cause an exception to be thrown.
Calling
Resource.close()on an object that has been sent will have no effect, so this method is safe to call within a try-with-resources statement.- Specified by:
sendin interfaceResource<EmptyLastHttpContent>
-
close
public void close()
Description copied from interface:ResourceClose the resource, making it inaccessible.Note, this method is not thread-safe unless otherwise specified.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceResource<EmptyLastHttpContent>
-
isAccessible
public boolean isAccessible()
Description copied from interface:ResourceCheck if this object is accessible.- Specified by:
isAccessiblein interfaceResource<EmptyLastHttpContent>- Returns:
trueif this object is still valid and can be accessed, otherwisefalseif, for instance, this object has been dropped/deallocated, or been sent elsewhere.
-
touch
public EmptyLastHttpContent touch(Object hint)
Description copied from interface:ResourceRecord the current access location for debugging purposes. This information may be included if the resource throws a life-cycle related exception, or if it leaks. If this resource has already been closed, then this method has no effect.- Specified by:
touchin interfaceResource<EmptyLastHttpContent>- Parameters:
hint- An optional hint about this access and its context. May benull.- Returns:
- This resource instance.
-
trailingHeaders
public HttpHeaders trailingHeaders()
- Specified by:
trailingHeadersin interfaceLastHttpContent<EmptyLastHttpContent>
-
decoderResult
public DecoderResult decoderResult()
Description copied from interface:DecoderResultProviderReturns the result of decoding this object.- Specified by:
decoderResultin interfaceDecoderResultProvider
-
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
-
-