Package com.wavefront.ingester
Class Ingester
- java.lang.Object
-
- com.wavefront.ingester.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<?>,?>childChannelOptionsprotected io.netty.channel.ChannelInitializerinitializerThe channel initializer object for the netty channelprotected intlisteningPortThe port that this ingester should be listening onprotected 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDecoders(io.netty.channel.Channel ch, 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).protected voidaddIdleTimeoutHandler(io.netty.channel.ChannelPipeline pipeline)Adds an idle timeout handler to the given pipelineIngesterwithChildChannelOptions(Map<io.netty.channel.ChannelOption<?>,?> childChannelOptions)IngesterwithParentChannelOptions(Map<io.netty.channel.ChannelOption<?>,?> parentChannelOptions)
-
-
-
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
-
-
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 todecoders- the list of decoders to add to the channel
-
-