A man with a long-term history of bronchial asthma died from asphyxia. Histological examination of his lungs revealed that the lumens of bronchioles and minor bronchi contained a lot of mucus with some eosinophils. There was also sclerosis of interalveolar septa, dilatation of alveole lumens. What mechanism accounts for the development of hypersensitivity reaction?