public class DefaultFullHttpRequest extends DefaultHttpRequest implements FullHttpRequest
FullHttpRequest.EMPTY_LAST_CONTENT| Constructor and Description |
|---|
DefaultFullHttpRequest(HttpVersion httpVersion,
HttpMethod method,
String uri)
Create a full HTTP response with the given HTTP version, method, and URI.
|
DefaultFullHttpRequest(HttpVersion httpVersion,
HttpMethod method,
String uri,
boolean validateHeaders)
Deprecated.
Use the
DefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf,
HttpHeadersFactory, HttpHeadersFactory) constructor instead. |
DefaultFullHttpRequest(HttpVersion httpVersion,
HttpMethod method,
String uri,
ByteBuf content)
Create a full HTTP response with the given HTTP version, method, URI, and contents.
|
DefaultFullHttpRequest(HttpVersion httpVersion,
HttpMethod method,
String uri,
ByteBuf content,
boolean validateHeaders)
Deprecated.
Use the
DefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf,
HttpHeadersFactory, HttpHeadersFactory) constructor instead. |
DefaultFullHttpRequest(HttpVersion httpVersion,
HttpMethod method,
String uri,
ByteBuf content,
HttpHeadersFactory headersFactory,
HttpHeadersFactory trailersFactory)
Create a full HTTP response with the given HTTP version, method, URI, contents,
and factories for creating headers and trailers.
|
DefaultFullHttpRequest(HttpVersion httpVersion,
HttpMethod method,
String uri,
ByteBuf content,
HttpHeaders headers,
HttpHeaders trailingHeader)
Create a full HTTP response with the given HTTP version, method, URI, contents, and header and trailer objects.
|
| Modifier and Type | Method and Description |
|---|---|
ByteBuf |
content()
Return the data which is held by this
ByteBufHolder. |
FullHttpRequest |
copy()
Creates a deep copy of this
ByteBufHolder. |
FullHttpRequest |
duplicate()
Duplicates this
ByteBufHolder. |
boolean |
equals(Object o) |
int |
hashCode() |
int |
refCnt()
Returns the reference count of this object.
|
boolean |
release()
Decreases the reference count by
1 and deallocates this object if the reference count reaches at
0. |
boolean |
release(int decrement)
Decreases the reference count by the specified
decrement and deallocates this object if the reference
count reaches at 0. |
FullHttpRequest |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content. |
FullHttpRequest |
retain()
Increases the reference count by
1. |
FullHttpRequest |
retain(int increment)
Increases the reference count by the specified
increment. |
FullHttpRequest |
retainedDuplicate()
Duplicates this
ByteBufHolder. |
FullHttpRequest |
setMethod(HttpMethod method)
Set the
HttpMethod of this HttpRequest. |
FullHttpRequest |
setProtocolVersion(HttpVersion version)
Set the protocol version of this
HttpMessage |
FullHttpRequest |
setUri(String uri)
Set the requested URI (or alternatively, path)
|
String |
toString() |
FullHttpRequest |
touch()
Records the current access location of this object for debugging purposes.
|
FullHttpRequest |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
HttpHeaders |
trailingHeaders() |
getMethod, getUri, method, urigetProtocolVersion, headers, protocolVersiondecoderResult, getDecoderResult, setDecoderResultclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMethod, getUri, method, urigetProtocolVersion, headers, protocolVersiongetDecoderResultdecoderResult, setDecoderResultpublic DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri)
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, ByteBuf content)
@Deprecated public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, boolean validateHeaders)
DefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf,
HttpHeadersFactory, HttpHeadersFactory) constructor instead.@Deprecated public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, ByteBuf content, boolean validateHeaders)
DefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf,
HttpHeadersFactory, HttpHeadersFactory) constructor instead.public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, ByteBuf content, HttpHeadersFactory headersFactory, HttpHeadersFactory trailersFactory)
The recommended default header factory is DefaultHttpHeadersFactory.headersFactory(),
and the recommended default trailer factory is DefaultHttpHeadersFactory.trailersFactory().
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, ByteBuf content, HttpHeaders headers, HttpHeaders trailingHeader)
public HttpHeaders trailingHeaders()
trailingHeaders in interface LastHttpContentpublic ByteBuf content()
ByteBufHolderByteBufHolder.content in interface ByteBufHolderpublic int refCnt()
ReferenceCounted0, it means this object has been deallocated.refCnt in interface ReferenceCountedpublic FullHttpRequest retain()
ReferenceCounted1.retain in interface ByteBufHolderretain in interface FullHttpMessageretain in interface FullHttpRequestretain in interface HttpContentretain in interface LastHttpContentretain in interface ReferenceCountedpublic FullHttpRequest retain(int increment)
ReferenceCountedincrement.retain in interface ByteBufHolderretain in interface FullHttpMessageretain in interface FullHttpRequestretain in interface HttpContentretain in interface LastHttpContentretain in interface ReferenceCountedpublic FullHttpRequest touch()
ReferenceCountedResourceLeakDetector. This method is a shortcut to touch(null).touch in interface ByteBufHoldertouch in interface FullHttpMessagetouch in interface FullHttpRequesttouch in interface HttpContenttouch in interface LastHttpContenttouch in interface ReferenceCountedpublic FullHttpRequest touch(Object hint)
ReferenceCountedResourceLeakDetector.touch in interface ByteBufHoldertouch in interface FullHttpMessagetouch in interface FullHttpRequesttouch in interface HttpContenttouch in interface LastHttpContenttouch in interface ReferenceCountedpublic boolean release()
ReferenceCounted1 and deallocates this object if the reference count reaches at
0.release in interface ReferenceCountedtrue if and only if the reference count became 0 and this object has been deallocatedpublic boolean release(int decrement)
ReferenceCounteddecrement and deallocates this object if the reference
count reaches at 0.release in interface ReferenceCountedtrue if and only if the reference count became 0 and this object has been deallocatedpublic FullHttpRequest setProtocolVersion(HttpVersion version)
HttpMessageHttpMessagesetProtocolVersion in interface FullHttpRequestsetProtocolVersion in interface HttpMessagesetProtocolVersion in interface HttpRequestsetProtocolVersion in class DefaultHttpRequestpublic FullHttpRequest setMethod(HttpMethod method)
HttpRequestHttpMethod of this HttpRequest.setMethod in interface FullHttpRequestsetMethod in interface HttpRequestsetMethod in class DefaultHttpRequestpublic FullHttpRequest setUri(String uri)
HttpRequestsetUri in interface FullHttpRequestsetUri in interface HttpRequestsetUri in class DefaultHttpRequestpublic FullHttpRequest copy()
ByteBufHolderByteBufHolder.copy in interface ByteBufHoldercopy in interface FullHttpMessagecopy in interface FullHttpRequestcopy in interface HttpContentcopy in interface LastHttpContentpublic FullHttpRequest duplicate()
ByteBufHolderByteBufHolder. Be aware that this will not automatically call ByteBufHolder.retain().duplicate in interface ByteBufHolderduplicate in interface FullHttpMessageduplicate in interface FullHttpRequestduplicate in interface HttpContentduplicate in interface LastHttpContentpublic FullHttpRequest retainedDuplicate()
ByteBufHolderByteBufHolder. This method returns a retained duplicate unlike ByteBufHolder.duplicate().retainedDuplicate in interface ByteBufHolderretainedDuplicate in interface FullHttpMessageretainedDuplicate in interface FullHttpRequestretainedDuplicate in interface HttpContentretainedDuplicate in interface LastHttpContentByteBuf.retainedDuplicate()public FullHttpRequest replace(ByteBuf content)
ByteBufHolderByteBufHolder which contains the specified content.replace in interface ByteBufHolderreplace in interface FullHttpMessagereplace in interface FullHttpRequestreplace in interface HttpContentreplace in interface LastHttpContentpublic int hashCode()
hashCode in class DefaultHttpRequestpublic boolean equals(Object o)
equals in class DefaultHttpRequestpublic String toString()
toString in class DefaultHttpRequestCopyright © 2008–2025 The Netty Project. All rights reserved.