Class ChannelUtils
- java.lang.Object
-
- software.amazon.awssdk.http.nio.netty.internal.utils.ChannelUtils
-
public final class ChannelUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods 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 channelstatic void
removeIfExists(io.netty.channel.ChannelPipeline pipeline, Class<? extends io.netty.channel.ChannelHandler>... handlers)
Removes handlers of the given class types from the pipeline.
-
-
-
Method Detail
-
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 fromhandlers
- 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 channelkey
- the key of the attribute- Returns:
- optional attribute
-
-