Abrupt switching and hysteresis of transmittivity of an ultrathin film consisting of J-aggregates