Extract out fillHandler in RPCHandler.