I found the answer.
By using ObjectSerializationCodecFactory on both client and server side, I can pass custom objects and collections.
ObjectSerializationCodecFactory oscf = new ObjectSerializationCodecFactory();
oscf.setDecoderMaxObjectSize(1048576);
connector.getFilterChain().addLast("codec", new ProtocolCodecFilter(oscf)