EZP-21191: extract base gateway class