def __init__(self, config, logHandlers=None, deviceInfo=None):
if config["<STR_LIT>"]["<STR_LIT>"] == "<STR_LIT>":<EOL><INDENT>raise ConfigurationException("<STR_LIT>")<EOL><DEDENT>self._config = GatewayClientConfig(**config)<EOL>AbstractClient.__init__(<EOL>self,<EOL>domain=self._config.domain,<EOL>organization=self._config.orgId,<EOL>clientId=self._config.clientId,<EOL>username=self._config.username,<EOL>password=self._config.password,<EOL>port=self._config.port,<EOL>transport=self._config.transport,<EOL>cleanStart=self._config.cleanStart,<EOL>sessionExpiry=self._config.sessionExpiry,<EOL>keepAlive=self._config.keepAlive,<EOL>caFile=self._config.caFile,<EOL>logLevel=self._config.logLevel,<EOL>logHandlers=logHandlers,<EOL>)<EOL>self.COMMAND_TOPIC = "<STR_LIT>" + self._config.typeId + "<STR_LIT>" + self._config.deviceId + "<STR_LIT>"<EOL>gatewayCommandTopic = "<STR_LIT>" + self._config.typeId + "<STR_LIT>" + self._config.deviceId + "<STR_LIT>"<EOL>deviceCommandTopic = "<STR_LIT>"<EOL>messageNotificationTopic = "<STR_LIT>" + self._config.typeId + "<STR_LIT>" + self._config.deviceId + "<STR_LIT>"<EOL>self.client.message_callback_add(gatewayCommandTopic, self._onCommand)<EOL>self.client.message_callback_add(deviceCommandTopic, self._onDeviceCommand)<EOL>self.client.message_callback_add(messageNotificationTopic, self._onMessageNotification)<EOL>self.deviceCommandCallback = None<EOL>self.notificationCallback = None<EOL>self.readyForDeviceMgmt = threading.Event()<EOL>self.client.message_callback_add("<STR_LIT>", self.__onDeviceMgmtResponse)<EOL>self._deviceMgmtRequestsPendingLock = threading.Lock()<EOL>self._deviceMgmtRequestsPending = {}<EOL>self._deviceMgmtObservationsLock = threading.Lock()<EOL>self._deviceMgmtObservations = []<EOL>self.metadata = {}<EOL>if deviceInfo is not None:<EOL><INDENT>self._deviceInfo = deviceInfo<EOL><DEDENT>else:<EOL><INDENT>self._deviceInfo = DeviceInfo()<EOL><DEDENT>self._location = None<EOL>self._errorCode = None<EOL>self._subscriptions[self.DM_RESPONSE_TOPIC_TEMPLATE % (self._config.typeId, self._config.deviceId)] = <NUM_LIT:1><EOL>self._subscriptions[self.DM_OBSERVE_TOPIC_TEMPLATE % (self._config.typeId, self._config.deviceId)] = <NUM_LIT:1><EOL>self._subscriptions[self.COMMAND_TOPIC] = <NUM_LIT:1><EOL>
Override the constructor