How does Apache Mina' filter handle different request? For example I have two requests: LoginRequest and StudentRequest, and I have written corresponding factory: LoginCodecFactory and StudentCodecFactory. then I added them into the filter:
acceptor.getFilterChain().addLast("protocol", new ProtocolCodecFilter(new LoginCodecFactory(false)));
acceptor.getFilterChain().addLast("protocoltest", new ProtocolCodecFilter(new StudentCodecFactory(false)));
This does not work...So how to let the filter pick up the corresponding factory to handle the request at runtime?