MatterHandler = function MatterHandler(gladys, MatterMain, ProjectChipMatter, serviceId) {
  this.gladys = gladys;
  this.MatterMain = MatterMain;
  this.ProjectChipMatter = ProjectChipMatter;
  this.serviceId = serviceId;
  this.os = os;
  this.devices = [];
  this.nodesMap = new Map();
  this.stateChangeListeners = new Set();
  this.commissioningController = null;
  this.backupController = gladys.job.wrapper(JOB_TYPES.SERVICE_MATTER_BACKUP, this.backupController.bind(this));
  process.on('SIGTERM', this.stop);
  process.on('SIGINT', this.stop);
}
@description Matter handler.
@param {object} gladys - Gladys instance.
@param {object} MatterMain - Matter main.
@param {object} ProjectChipMatter - Project chip matter.
@param {string} serviceId - UUID of the service in DB.
@example
const matterHandler = new MatterHandler(gladys, MatterMain, ProjectChipMatter, serviceId);