I
- Input type for the pipeline. This is the type one writes to this pipeline.O
- Output type of the emitted observable. This is the type one reads from this pipeline.public abstract class RxRequiredConfigurator<I,O> extends java.lang.Object implements PipelineConfigurator<I,O>
PipelineConfigurator
which is ALWAYS added at the end of the pipeline. This
pipeline configurator bridges between netty's pipeline processing and Rx Observable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BYTES_INSPECTOR_HANDLER_NAME |
static java.lang.String |
CONN_LIFECYCLE_HANDLER_NAME |
static java.lang.String |
NETTY_OBSERVABLE_ADAPTER_NAME |
Modifier | Constructor and Description |
---|---|
protected |
RxRequiredConfigurator(MetricEventsSubject eventsSubject,
ChannelMetricEventProvider metricEventProvider) |
protected |
RxRequiredConfigurator(MetricEventsSubject eventsSubject,
ChannelMetricEventProvider metricEventProvider,
io.netty.util.concurrent.EventExecutorGroup handlersExecutorGroup) |
Modifier and Type | Method and Description |
---|---|
void |
configureNewPipeline(io.netty.channel.ChannelPipeline pipeline)
A callback to configure the passed
pipeline . |
protected io.netty.util.concurrent.EventExecutorGroup |
getConnectionLifecycleHandlerExecutor() |
protected io.netty.util.concurrent.EventExecutorGroup |
getObservableAdapterExecutor() |
protected abstract io.netty.channel.ChannelHandler |
newConnectionLifecycleHandler(io.netty.channel.ChannelPipeline pipeline) |
public static final java.lang.String CONN_LIFECYCLE_HANDLER_NAME
public static final java.lang.String BYTES_INSPECTOR_HANDLER_NAME
public static final java.lang.String NETTY_OBSERVABLE_ADAPTER_NAME
protected RxRequiredConfigurator(MetricEventsSubject eventsSubject, ChannelMetricEventProvider metricEventProvider)
protected RxRequiredConfigurator(MetricEventsSubject eventsSubject, ChannelMetricEventProvider metricEventProvider, io.netty.util.concurrent.EventExecutorGroup handlersExecutorGroup)
eventsSubject
- Metrics event subject.metricEventProvider
- Metrics event provider.handlersExecutorGroup
- The EventExecutorGroup
to be used for all the handlers added by this
configurator. This can be null
, in which case the eventloop for the
underlying channel is used.public void configureNewPipeline(io.netty.channel.ChannelPipeline pipeline)
PipelineConfigurator
pipeline
. This will be invoked everytime a new netty pipeline is
created, which is whenever a new channel is established.configureNewPipeline
in interface PipelineConfigurator<I,O>
pipeline
- The pipeline to configure.protected io.netty.util.concurrent.EventExecutorGroup getConnectionLifecycleHandlerExecutor()
protected io.netty.util.concurrent.EventExecutorGroup getObservableAdapterExecutor()
protected abstract io.netty.channel.ChannelHandler newConnectionLifecycleHandler(io.netty.channel.ChannelPipeline pipeline)