Ruijie use factory pattern