Class Ingester

  • All Implemented Interfaces:
    Runnable
    Direct Known Subclasses:
    TcpIngester, UdpIngester

    public abstract class Ingester
    extends Object
    implements Runnable
    Ingester thread that sets up decoders and a command handler to listen for metrics on a port.
    Author:
    Clement Pang (clement@wavefront.com).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Map<io.netty.channel.ChannelOption<?>,​?> childChannelOptions  
      protected io.netty.channel.ChannelInitializer initializer
      The channel initializer object for the netty channel
      protected int listeningPort
      The port that this ingester should be listening on
      protected Map<io.netty.channel.ChannelOption<?>,​?> parentChannelOptions  
    • Constructor Summary

      Constructors 
      Constructor Description
      Ingester​(io.netty.channel.ChannelHandler commandHandler, int port)
      Deprecated.
      Ingester​(io.netty.channel.ChannelInitializer initializer, int port)  
      Ingester​(List<com.google.common.base.Function<io.netty.channel.Channel,​io.netty.channel.ChannelHandler>> decoders, io.netty.channel.ChannelHandler commandHandler, int port)
      Deprecated.
    • Field Detail

      • listeningPort

        protected final int listeningPort
        The port that this ingester should be listening on
      • initializer

        protected io.netty.channel.ChannelInitializer initializer
        The channel initializer object for the netty channel
      • parentChannelOptions

        @Nullable
        protected Map<io.netty.channel.ChannelOption<?>,​?> parentChannelOptions
      • childChannelOptions

        @Nullable
        protected Map<io.netty.channel.ChannelOption<?>,​?> childChannelOptions
    • Constructor Detail

      • Ingester

        @Deprecated
        public Ingester​(@Nullable
                        List<com.google.common.base.Function<io.netty.channel.Channel,​io.netty.channel.ChannelHandler>> decoders,
                        io.netty.channel.ChannelHandler commandHandler,
                        int port)
        Deprecated.
      • Ingester

        @Deprecated
        public Ingester​(io.netty.channel.ChannelHandler commandHandler,
                        int port)
        Deprecated.
      • Ingester

        public Ingester​(io.netty.channel.ChannelInitializer initializer,
                        int port)
    • Method Detail

      • withParentChannelOptions

        public Ingester withParentChannelOptions​(Map<io.netty.channel.ChannelOption<?>,​?> parentChannelOptions)
      • withChildChannelOptions

        public Ingester withChildChannelOptions​(Map<io.netty.channel.ChannelOption<?>,​?> childChannelOptions)
      • addIdleTimeoutHandler

        protected void addIdleTimeoutHandler​(io.netty.channel.ChannelPipeline pipeline)
        Adds an idle timeout handler to the given pipeline
        Parameters:
        pipeline - the pipeline to add the idle timeout handler
      • addDecoders

        protected void addDecoders​(io.netty.channel.Channel ch,
                                   @Nullable
                                   List<com.google.common.base.Function<io.netty.channel.Channel,​io.netty.channel.ChannelHandler>> decoders)
        Adds additional decoders passed in during construction of this object (if not null).
        Parameters:
        ch - the channel and pipeline to add these decoders to
        decoders - the list of decoders to add to the channel