Class TestHttp2StreamChannel

java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.embedded.EmbeddedChannel
org.apache.kafka.common.network.netty.TestHttp2StreamChannel
All Implemented Interfaces:
io.netty.channel.Channel, io.netty.channel.ChannelOutboundInvoker, io.netty.handler.codec.http2.Http2StreamChannel, io.netty.util.AttributeMap, Comparable<io.netty.channel.Channel>

public class TestHttp2StreamChannel extends io.netty.channel.embedded.EmbeddedChannel implements io.netty.handler.codec.http2.Http2StreamChannel
An implementation of Http2StreamChannel for testing that provides the same functionality as EmbeddedChannel but also allows for custom HTTP/2 stream behaviours.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.Channel

    io.netty.channel.Channel.Unsafe
  • Constructor Summary

    Constructors
    Constructor
    Description
    TestHttp2StreamChannel(io.netty.channel.Channel parent, int streamId)
     
    TestHttp2StreamChannel(io.netty.channel.Channel parent, int streamId, boolean mockAddresses)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.netty.channel.ChannelConfig
     
     
    io.netty.channel.Channel
     
     
    void
    setWriteInterceptor(Function<Object, io.netty.channel.ChannelFuture> interceptor)
     
    io.netty.handler.codec.http2.Http2FrameStream
     
    io.netty.channel.ChannelFuture
     

    Methods inherited from class io.netty.channel.embedded.EmbeddedChannel

    advanceTimeBy, bind, bind, checkException, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, finish, finishAndReleaseAll, flush, flushInbound, flushOutbound, freezeTime, hasPendingTasks, inboundMessages, isActive, isOpen, lastInboundBuffer, lastOutboundBuffer, metadata, outboundMessages, read, readInbound, readOutbound, register, releaseInbound, releaseOutbound, runPendingTasks, runScheduledPendingTasks, unfreezeTime, unsafe, write, writeAndFlush, writeAndFlush, writeInbound, writeOneInbound, writeOneInbound, writeOneOutbound, writeOneOutbound, writeOutbound

    Methods inherited from class io.netty.channel.AbstractChannel

    alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, compareTo, equals, eventLoop, hashCode, id, isRegistered, isWritable, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, pipeline, toString, voidPromise

    Methods inherited from class io.netty.util.DefaultAttributeMap

    attr, hasAttr

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.netty.util.AttributeMap

    attr, hasAttr

    Methods inherited from interface io.netty.channel.Channel

    alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, metadata, pipeline, read, unsafe

    Methods inherited from interface io.netty.channel.ChannelOutboundInvoker

    bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, writeAndFlush, writeAndFlush

    Methods inherited from interface Comparable

    compareTo
  • Constructor Details

    • TestHttp2StreamChannel

      public TestHttp2StreamChannel(io.netty.channel.Channel parent, int streamId, boolean mockAddresses)
    • TestHttp2StreamChannel

      public TestHttp2StreamChannel(io.netty.channel.Channel parent, int streamId)
  • Method Details

    • remoteAddress

      public SocketAddress remoteAddress()
      Specified by:
      remoteAddress in interface io.netty.channel.Channel
      Overrides:
      remoteAddress in class io.netty.channel.AbstractChannel
    • localAddress

      public SocketAddress localAddress()
      Specified by:
      localAddress in interface io.netty.channel.Channel
      Overrides:
      localAddress in class io.netty.channel.AbstractChannel
    • config

      public io.netty.channel.ChannelConfig config()
      Specified by:
      config in interface io.netty.channel.Channel
      Overrides:
      config in class io.netty.channel.embedded.EmbeddedChannel
    • setWriteInterceptor

      public void setWriteInterceptor(Function<Object, io.netty.channel.ChannelFuture> interceptor)
    • write

      public io.netty.channel.ChannelFuture write(Object msg)
      Specified by:
      write in interface io.netty.channel.ChannelOutboundInvoker
      Overrides:
      write in class io.netty.channel.embedded.EmbeddedChannel
    • stream

      public io.netty.handler.codec.http2.Http2FrameStream stream()
      Specified by:
      stream in interface io.netty.handler.codec.http2.Http2StreamChannel
    • parent

      public io.netty.channel.Channel parent()
      Specified by:
      parent in interface io.netty.channel.Channel
      Overrides:
      parent in class io.netty.channel.AbstractChannel