Shephertz has created a websocket iofilter that can be added in Apache mina tcp server chain. The features of this codec are
1) Works with binary data sent/received over websocket
2) Abstracts the client details from the Handler code i.e. the handler need not be aware that the remote endpoint is a browser or native client.
3) Tested with binary data sent/received on latest chrome and firefox browsers. IE 9 doesn't support websockets and we will make changes if required for IE 10 when its released and if it supports websockets.