Class ChannelUtils

java.lang.Object
software.amazon.awssdk.http.nio.netty.internal.utils.ChannelUtils

@SdkInternalApi public final class ChannelUtils extends Object
  • Field Details

  • Method Details

    • removeIfExists

      @SafeVarargs public static void removeIfExists(io.netty.channel.ChannelPipeline pipeline, Class<? extends io.netty.channel.ChannelHandler>... handlers)
      Removes handlers of the given class types from the pipeline.
      Parameters:
      pipeline - the pipeline to remove handlers from
      handlers - handlers to remove, identified by class
    • removeIfExists

      public static void removeIfExists(io.netty.channel.ChannelPipeline pipeline, String... handlers)
    • getAttribute

      public static <T> Optional<T> getAttribute(io.netty.channel.Channel channel, io.netty.util.AttributeKey<T> key)
      Retrieve optional attribute of the channel
      Type Parameters:
      T - the type of the attribute value
      Parameters:
      channel - the channel
      key - the key of the attribute
      Returns:
      optional attribute