Class DelegateStreamedHttpRequest

java.lang.Object
io.micronaut.http.netty.stream.DelegateStreamedHttpRequest
All Implemented Interfaces:
HotObservable<io.netty.handler.codec.http.HttpContent>, StreamedHttpMessage, StreamedHttpRequest, io.netty.handler.codec.DecoderResultProvider, io.netty.handler.codec.http.HttpMessage, io.netty.handler.codec.http.HttpObject, io.netty.handler.codec.http.HttpRequest, Publisher<io.netty.handler.codec.http.HttpContent>

@Internal public class DelegateStreamedHttpRequest extends Object implements StreamedHttpRequest
Delegate for Streamed HTTP Request.
Since:
1.0
Author:
jroper, Graeme Rocher
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final io.netty.handler.codec.http.HttpMessage
     
    protected final io.netty.handler.codec.http.HttpRequest
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    DelegateStreamedHttpRequest(io.netty.handler.codec.http.HttpRequest request, Publisher<? extends io.netty.handler.codec.http.HttpContent> stream)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases the stream if there is no subscriber.
    io.netty.handler.codec.DecoderResult
     
    io.netty.handler.codec.DecoderResult
    Deprecated.
    io.netty.handler.codec.http.HttpMethod
    Deprecated.
    io.netty.handler.codec.http.HttpVersion
    Deprecated.
    Deprecated.
    io.netty.handler.codec.http.HttpHeaders
     
    boolean
    Has the stream been consumed.
    io.netty.handler.codec.http.HttpMethod
     
    io.netty.handler.codec.http.HttpVersion
     
    void
    setDecoderResult(io.netty.handler.codec.DecoderResult result)
     
    io.netty.handler.codec.http.HttpRequest
    setMethod(io.netty.handler.codec.http.HttpMethod method)
     
    io.netty.handler.codec.http.HttpRequest
    setProtocolVersion(io.netty.handler.codec.http.HttpVersion version)
     
    io.netty.handler.codec.http.HttpRequest
     
    void
    subscribe(Subscriber<? super io.netty.handler.codec.http.HttpContent> subscriber)
     
     
    uri()
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, 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, setMethod, setProtocolVersion, setUri, uri
  • Field Details

    • request

      protected final io.netty.handler.codec.http.HttpRequest request
    • message

      protected final io.netty.handler.codec.http.HttpMessage message
  • Constructor Details

    • DelegateStreamedHttpRequest

      public DelegateStreamedHttpRequest(io.netty.handler.codec.http.HttpRequest request, Publisher<? extends io.netty.handler.codec.http.HttpContent> stream)
      Parameters:
      request - The Http request
      stream - The publisher
  • Method Details

    • isConsumed

      public boolean isConsumed()
      Description copied from interface: StreamedHttpRequest
      Has the stream been consumed.
      Specified by:
      isConsumed in interface StreamedHttpRequest
      Returns:
      True if it has
    • subscribe

      public void subscribe(Subscriber<? super io.netty.handler.codec.http.HttpContent> subscriber)
      Specified by:
      subscribe in interface Publisher<io.netty.handler.codec.http.HttpContent>
    • closeIfNoSubscriber

      public void closeIfNoSubscriber()
      Description copied from interface: StreamedHttpRequest
      Releases the stream if there is no subscriber.
      Specified by:
      closeIfNoSubscriber in interface HotObservable<io.netty.handler.codec.http.HttpContent>
      Specified by:
      closeIfNoSubscriber in interface StreamedHttpRequest
    • setMethod

      public io.netty.handler.codec.http.HttpRequest setMethod(io.netty.handler.codec.http.HttpMethod method)
      Specified by:
      setMethod in interface io.netty.handler.codec.http.HttpRequest
    • setUri

      public io.netty.handler.codec.http.HttpRequest setUri(String uri)
      Specified by:
      setUri in interface io.netty.handler.codec.http.HttpRequest
    • getMethod

      @Deprecated public io.netty.handler.codec.http.HttpMethod getMethod()
      Deprecated.
      Specified by:
      getMethod in interface io.netty.handler.codec.http.HttpRequest
    • method

      public io.netty.handler.codec.http.HttpMethod method()
      Specified by:
      method in interface io.netty.handler.codec.http.HttpRequest
    • getUri

      @Deprecated public String getUri()
      Deprecated.
      Specified by:
      getUri in interface io.netty.handler.codec.http.HttpRequest
    • uri

      public String uri()
      Specified by:
      uri in interface io.netty.handler.codec.http.HttpRequest
    • setProtocolVersion

      public io.netty.handler.codec.http.HttpRequest setProtocolVersion(io.netty.handler.codec.http.HttpVersion version)
      Specified by:
      setProtocolVersion in interface io.netty.handler.codec.http.HttpMessage
      Specified by:
      setProtocolVersion in interface io.netty.handler.codec.http.HttpRequest
    • getProtocolVersion

      @Deprecated public io.netty.handler.codec.http.HttpVersion getProtocolVersion()
      Deprecated.
      Specified by:
      getProtocolVersion in interface io.netty.handler.codec.http.HttpMessage
    • protocolVersion

      public io.netty.handler.codec.http.HttpVersion protocolVersion()
      Specified by:
      protocolVersion in interface io.netty.handler.codec.http.HttpMessage
    • headers

      public io.netty.handler.codec.http.HttpHeaders headers()
      Specified by:
      headers in interface io.netty.handler.codec.http.HttpMessage
    • getDecoderResult

      @Deprecated public io.netty.handler.codec.DecoderResult getDecoderResult()
      Deprecated.
      Specified by:
      getDecoderResult in interface io.netty.handler.codec.http.HttpObject
    • decoderResult

      public io.netty.handler.codec.DecoderResult decoderResult()
      Specified by:
      decoderResult in interface io.netty.handler.codec.DecoderResultProvider
    • setDecoderResult

      public void setDecoderResult(io.netty.handler.codec.DecoderResult result)
      Specified by:
      setDecoderResult in interface io.netty.handler.codec.DecoderResultProvider
    • toString

      public String toString()
      Overrides:
      toString in class Object