Interface HttpMessage.MessageTransformations<Self>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> Self addAttribute​(AttributeKey<T> key, T value)  
      Self addCredentials​(HttpCredentials credentials)
      Returns a copy of this message with the given http credential header added to the list of headers.
      Self addHeader​(HttpHeader header)
      Returns a copy of this message with the given header added to the list of headers.
      Self addHeaders​(java.lang.Iterable<HttpHeader> headers)
      Returns a copy of this message with the given headers added to the list of headers.
      Self removeAttribute​(AttributeKey<?> key)
      Returns a copy of this message with the attribute with this key (if any) removed.
      Self removeHeader​(java.lang.String headerName)
      Returns a copy of this message with all headers of the given name (case-insensitively) removed.
      java.util.concurrent.CompletionStage<? extends Self> toStrict​(long timeoutMillis, long maxBytes, akka.actor.ClassicActorSystemProvider system)
      Returns a CompletionStage of Self message with strict entity that contains the same data as this entity which is only completed when the complete entity has been collected.
      java.util.concurrent.CompletionStage<? extends Self> toStrict​(long timeoutMillis, long maxBytes, java.util.concurrent.Executor ec, akka.stream.Materializer materializer)
      Returns a CompletionStage of Self message with strict entity that contains the same data as this entity which is only completed when the complete entity has been collected.
      java.util.concurrent.CompletionStage<? extends Self> toStrict​(long timeoutMillis, akka.actor.ClassicActorSystemProvider system)
      Returns a CompletionStage of Self message with strict entity that contains the same data as this entity which is only completed when the complete entity has been collected.
      java.util.concurrent.CompletionStage<? extends Self> toStrict​(long timeoutMillis, java.util.concurrent.Executor ec, akka.stream.Materializer materializer)
      Returns a CompletionStage of Self message with strict entity that contains the same data as this entity which is only completed when the complete entity has been collected.
      <T> Self transformEntityDataBytes​(akka.stream.Graph<akka.stream.FlowShape<akka.util.ByteString,​akka.util.ByteString>,​T> transformer)
      Returns a copy of Self message after applying the given transformation
      Self withEntity​(byte[] bytes)
      Returns a copy of Self message with a new entity.
      Self withEntity​(ContentType.NonBinary type, java.lang.String string)
      Returns a copy of Self message with a new entity.
      Self withEntity​(ContentType type, byte[] bytes)
      Returns a copy of Self message with a new entity.
      Self withEntity​(ContentType type, akka.util.ByteString bytes)
      Returns a copy of Self message with a new entity.
      Self withEntity​(ContentType type, java.io.File file)
      Returns a copy of Self message with a new entity.
      Self withEntity​(ContentType type, java.nio.file.Path file)
      Returns a copy of Self message with a new entity.
      Self withEntity​(RequestEntity entity)
      Returns a copy of Self message with a new entity.
      Self withEntity​(akka.util.ByteString bytes)
      Returns a copy of Self message with a new entity.
      Self withEntity​(java.lang.String string)
      Returns a copy of this message with a new entity.
      Self withHeaders​(java.lang.Iterable<HttpHeader> headers)
      Returns a copy of this message with new headers.
      Self withProtocol​(HttpProtocol protocol)
      Returns a copy of this message with a new protocol.
    • Method Detail

      • withProtocol

        Self withProtocol​(HttpProtocol protocol)
        Returns a copy of this message with a new protocol.
      • addHeader

        Self addHeader​(HttpHeader header)
        Returns a copy of this message with the given header added to the list of headers.
      • addHeaders

        Self addHeaders​(java.lang.Iterable<HttpHeader> headers)
        Returns a copy of this message with the given headers added to the list of headers.
      • withHeaders

        Self withHeaders​(java.lang.Iterable<HttpHeader> headers)
        Returns a copy of this message with new headers.
      • addCredentials

        Self addCredentials​(HttpCredentials credentials)
        Returns a copy of this message with the given http credential header added to the list of headers.
      • removeHeader

        Self removeHeader​(java.lang.String headerName)
        Returns a copy of this message with all headers of the given name (case-insensitively) removed.
      • removeAttribute

        Self removeAttribute​(AttributeKey<?> key)
        Returns a copy of this message with the attribute with this key (if any) removed.
      • withEntity

        Self withEntity​(java.lang.String string)
        Returns a copy of this message with a new entity.
      • withEntity

        Self withEntity​(byte[] bytes)
        Returns a copy of Self message with a new entity.
      • withEntity

        Self withEntity​(akka.util.ByteString bytes)
        Returns a copy of Self message with a new entity.
      • withEntity

        Self withEntity​(ContentType.NonBinary type,
                        java.lang.String string)
        Returns a copy of Self message with a new entity.
      • withEntity

        Self withEntity​(ContentType type,
                        byte[] bytes)
        Returns a copy of Self message with a new entity.
      • withEntity

        Self withEntity​(ContentType type,
                        akka.util.ByteString bytes)
        Returns a copy of Self message with a new entity.
      • withEntity

        Self withEntity​(ContentType type,
                        java.io.File file)
        Returns a copy of Self message with a new entity.
      • withEntity

        Self withEntity​(ContentType type,
                        java.nio.file.Path file)
        Returns a copy of Self message with a new entity.
      • withEntity

        Self withEntity​(RequestEntity entity)
        Returns a copy of Self message with a new entity.
      • transformEntityDataBytes

        <T> Self transformEntityDataBytes​(akka.stream.Graph<akka.stream.FlowShape<akka.util.ByteString,​akka.util.ByteString>,​T> transformer)
        Returns a copy of Self message after applying the given transformation
      • toStrict

        java.util.concurrent.CompletionStage<? extends Self> toStrict​(long timeoutMillis,
                                                                      java.util.concurrent.Executor ec,
                                                                      akka.stream.Materializer materializer)
        Returns a CompletionStage of Self message with strict entity that contains the same data as this entity which is only completed when the complete entity has been collected. As the duration of receiving the complete entity cannot be predicted, a timeout needs to be specified to guard the process against running and keeping resources infinitely. Use getEntity().getDataBytes and stream processing instead if the expected data is big or is likely to take a long time.
      • toStrict

        java.util.concurrent.CompletionStage<? extends Self> toStrict​(long timeoutMillis,
                                                                      long maxBytes,
                                                                      java.util.concurrent.Executor ec,
                                                                      akka.stream.Materializer materializer)
        Returns a CompletionStage of Self message with strict entity that contains the same data as this entity which is only completed when the complete entity has been collected. As the duration of receiving the complete entity cannot be predicted, a timeout needs to be specified to guard the process against running and keeping resources infinitely. Use getEntity().getDataBytes and stream processing instead if the expected data is big or is likely to take a long time.
      • toStrict

        java.util.concurrent.CompletionStage<? extends Self> toStrict​(long timeoutMillis,
                                                                      akka.actor.ClassicActorSystemProvider system)
        Returns a CompletionStage of Self message with strict entity that contains the same data as this entity which is only completed when the complete entity has been collected. As the duration of receiving the complete entity cannot be predicted, a timeout needs to be specified to guard the process against running and keeping resources infinitely. Use getEntity().getDataBytes and stream processing instead if the expected data is big or is likely to take a long time.
      • toStrict

        java.util.concurrent.CompletionStage<? extends Self> toStrict​(long timeoutMillis,
                                                                      long maxBytes,
                                                                      akka.actor.ClassicActorSystemProvider system)
        Returns a CompletionStage of Self message with strict entity that contains the same data as this entity which is only completed when the complete entity has been collected. As the duration of receiving the complete entity cannot be predicted, a timeout needs to be specified to guard the process against running and keeping resources infinitely. Use getEntity().getDataBytes and stream processing instead if the expected data is big or is likely to take a long time.