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

    Constructors
    Constructor
    Description
     
    HttpRequestMessage(io.netty.handler.codec.http.FullHttpRequest request)
    Used for conversion from FullHttpRequest to HttpRequestMessage
  • Method Summary

    Modifier and Type
    Method
    Description
    Modifies headers to reflect new host and new path if applicable.
    Necessary to inform metrics collector what kind of message is sent down ChannelPipeline.
    Necessary to inform metrics collector what kind of message is sent inbound ChannelPipeline.
    setUri(String path)
     

    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 from FullHttpRequest to HttpRequestMessage
  • Method Details