camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Mueller (JIRA)" <>
Subject [jira] Created: (CAMEL-2713) camel-netty: Add a registry based option for a custom ChannelPipelineFactory
Date Wed, 12 May 2010 13:13:43 GMT
camel-netty: Add a registry based option for a custom ChannelPipelineFactory

                 Key: CAMEL-2713
             Project: Apache Camel
          Issue Type: Improvement
    Affects Versions: 2.3.0
         Environment: All
            Reporter: Christian Mueller
             Fix For: 2.4.0

We will build an ims-component to communicate with our [IMS|]

As described in the Netty documentation in chapter [1.7.2.  The First Solution|],
I assume that we need a state full SimpleChannelHandler (class annotated with @ChannelPipelineCoverage("one")).
The proposed solution is to use a ChannelPipelineFactory which creates a new ChannelPipeline
and a new SimpleChannelHandler for each Channel.

public class TimeClientPipelineFactory implements ChannelPipelineFactory {

    public ChannelPipeline getPipeline() {
        ChannelPipeline pipeline = Channels.pipeline();
        pipeline.addLast("handler", new TimeClientHandler());
        return pipeline;

In the current implementation, this is not possible IMO. The custom handler, which is looked
up from the registry, is shared between all channels:

    channelPipeline.addLast("handler", consumer.getConfiguration().getHandler());

If I'm right, I would like to provide the patch (but unfortunately not in the next two weeks).


P.S: Very nice/clean code inside this component... :-)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message