I 've used the below code to set a a chainfilter . Unfortunately,
It is not working properly. I mean the filter has not been activated
when the acceptor receives a message.
What should I do to activate a filter for all sessions?
IoAcceptorConfig config = new DatagramAcceptorConfig();
DefaultIoFilterChainBuilder chain = config.getFilterChain();
final ConcurrentMap <SocketAddress, Message> activeMessageList =
new ConcurrentHashMap<SocketAddress, Message>();
chain.addFirst(
"logger", new LoggingFilter() );
chain.addLast(
"myFilter", new MyFilter() );
acceptor.bind(
new InetSocketAddress( PORT ),
new ConduitHandler( ), config);
Thanks,
Joao,