Class HttpRequestMessage
java.lang.Object
io.netty.handler.codec.http.DefaultHttpObject
io.netty.handler.codec.http.DefaultHttpMessage
io.netty.handler.codec.http.DefaultHttpRequest
io.netty.handler.codec.http.DefaultFullHttpRequest
google.registry.monitoring.blackbox.message.HttpRequestMessage
- All Implemented Interfaces:
OutboundMessageType
,io.netty.buffer.ByteBufHolder
,io.netty.handler.codec.DecoderResultProvider
,io.netty.handler.codec.http.FullHttpMessage
,io.netty.handler.codec.http.FullHttpRequest
,io.netty.handler.codec.http.HttpContent
,io.netty.handler.codec.http.HttpMessage
,io.netty.handler.codec.http.HttpObject
,io.netty.handler.codec.http.HttpRequest
,io.netty.handler.codec.http.LastHttpContent
,io.netty.util.ReferenceCounted
public class HttpRequestMessage
extends io.netty.handler.codec.http.DefaultFullHttpRequest
implements OutboundMessageType
OutboundMessageType
subtype that acts identically to DefaultFullHttpRequest
.
As it is an OutboundMessageType
subtype, there is a modifyMessage
method that
modifies the request to reflect the new host and optional path. We also implement a name
method, which returns a standard name and the current hostname.
-
Field Summary
Fields inherited from interface io.netty.handler.codec.http.LastHttpContent
EMPTY_LAST_CONTENT
-
Constructor Summary
ConstructorDescriptionHttpRequestMessage
(io.netty.handler.codec.http.FullHttpRequest request) Used for conversion fromFullHttpRequest
toHttpRequestMessage
-
Method Summary
Modifier and TypeMethodDescriptionmodifyMessage
(String... args) Modifies headers to reflect new host and new path if applicable.name()
Necessary to inform metrics collector what kind of message is sent downChannelPipeline
.Necessary to inform metrics collector what kind of message is sent inboundChannelPipeline
.Methods inherited from class io.netty.handler.codec.http.DefaultFullHttpRequest
content, copy, duplicate, equals, hashCode, refCnt, release, release, replace, retain, retain, retainedDuplicate, setMethod, setProtocolVersion, toString, touch, touch, trailingHeaders
Methods inherited from class io.netty.handler.codec.http.DefaultHttpRequest
getMethod, getUri, method, uri
Methods inherited from class io.netty.handler.codec.http.DefaultHttpMessage
getProtocolVersion, headers, protocolVersion
Methods inherited from class io.netty.handler.codec.http.DefaultHttpObject
decoderResult, getDecoderResult, setDecoderResult
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.netty.handler.codec.DecoderResultProvider
decoderResult, setDecoderResult
Methods inherited from interface io.netty.handler.codec.http.HttpMessage
getProtocolVersion, headers, protocolVersion
Methods inherited from interface io.netty.handler.codec.http.HttpObject
getDecoderResult
Methods inherited from interface io.netty.handler.codec.http.HttpRequest
getMethod, getUri, method, uri
-
Constructor Details
-
HttpRequestMessage
@Inject public HttpRequestMessage() -
HttpRequestMessage
public HttpRequestMessage(io.netty.handler.codec.http.FullHttpRequest request) Used for conversion fromFullHttpRequest
toHttpRequestMessage
-
-
Method Details
-
setUri
- Specified by:
setUri
in interfaceio.netty.handler.codec.http.FullHttpRequest
- Specified by:
setUri
in interfaceio.netty.handler.codec.http.HttpRequest
- Overrides:
setUri
in classio.netty.handler.codec.http.DefaultFullHttpRequest
-
modifyMessage
Modifies headers to reflect new host and new path if applicable.- Specified by:
modifyMessage
in interfaceOutboundMessageType
- Throws:
IllegalArgumentException
-
name
Description copied from interface:OutboundMessageType
Necessary to inform metrics collector what kind of message is sent downChannelPipeline
. Not equivalent to toString, as to different instances will have the same name if they perform the same action.- Specified by:
name
in interfaceOutboundMessageType
-
responseName
Description copied from interface:OutboundMessageType
Necessary to inform metrics collector what kind of message is sent inboundChannelPipeline
. Equivalent toname
but forInboundMessageType
.- Specified by:
responseName
in interfaceOutboundMessageType
-