Class ChannelFutures

java.lang.Object
org.apache.pulsar.common.util.netty.ChannelFutures

public class ChannelFutures extends Object
Static utility methods for operating on ChannelFutures.
  • Method Details

    • toCompletableFuture

      public static CompletableFuture<io.netty.channel.Channel> toCompletableFuture(io.netty.channel.ChannelFuture channelFuture)
      Convert a ChannelFuture into a CompletableFuture.
      Parameters:
      channelFuture - the ChannelFuture
      Returns:
      a CompletableFuture that completes successfully when the channelFuture completes successfully, and completes exceptionally if the channelFuture completes with a Throwable