Le 24/10/16 à 20:59, Murty Devarakonda a écrit :
> Thank you for the tip.  I looked into the NioSocketSession.filterChain and I
> could see my protocolcodecfactory object there.  Here is how I am adding the
> filters:
>
> protected static void addFilters(Properties props, NioSocketAcceptor
> acceptor, ProtocolCodecFactory factory)
>     {
>         DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();
>         String threadCountStr = props.getProperty("threads");
>         int threadCount = threadCountStr == null ? s_threadCount :
> Integer.parseInt(threadCountStr.trim());
>         chain.addLast("protocol", new ProtocolCodecFilter(factory));
>         if (threadCount > 0) {
>             ExecutorFilter filter = new ExecutorFilter(0, threadCount,
> s_timeout, TimeUnit.SECONDS);
>             chain.addLast("limiter", filter);
>         }
>     }
>
> The above method is being shared to create filter chains for the old port as
> well as new port.  Do you think the name "protocol" is causing some
> conflicts?  As the same name "protocol" is being used to add the code filter
> factory for both instances of the acceptors?

The 'protocol' name is not a problem at all.

Reply via email to