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

public final class ChannelUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Optional<T>
    getAttribute(io.netty.channel.Channel channel, io.netty.util.AttributeKey<T> key)
    Retrieve optional attribute of the channel
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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
    • 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