I have sended this msg to the users mailing list, my apologies if you are
subscribed to both lists.
-----------------------------------
Hi guys, I'm new to mina so pls be kind If I made silly questions. ;-)
I need to create an application protocol on top of http. I have been playing
with AsyncWeb and HttpRequest/Response messages and HttpCodecFactory.
My questions is:
Is there any way to work with HttpCodecFactory/ProtocolEncoder/ProtocolDecoder
for the "low level" Http Protocol and add another ProtocolCodecFilter to
encode/decode my custom messages I have been playing with Messages like
AutheticationRequest/AuthenticationResponse both extends from
DefaultHttpRequest/DefultHttpResponse, but I'm stuck with this error every
time I call IoSession.write(DefultHttpResponse) (this just happen when I add
MyCodecFactory to the FilterChain )
UnknownMessageTypeException: No message encoder found for message:
org.apache.asyncweb.common.defaulthttprespo...@3c9c31
this is my initialization code
HttpCodecFactory httpCodec = new HttpCodecFactory();
acceptor.getFilterChain().addLast("httpCodec",
new ProtocolCodecFilter(httpCodec));
MyCodecFactory mycodec= new MyCodecFactory ();
mycodec.addMessageEncoder(AuthenticationRequest.class,
AuthenticationRequestEncoder.class);
mycodec.addMessageEncoder(AuthenticationResponse.class,
AuthenticationResponseEncoder.class);
acceptor.getFilterChain().addLast("mycodec",
new ProtocolCodecFilter(mycodec));
any idea?
Thank you guys!
Cesar