def __init__(self, maintenance_communicator=INJECTED, ssl_private_key=INJECTED, ssl_certificate=INJECTED):
        # type: (MaintenanceCommunicator, str, str) -> None
        """
        :type maintenance_communicator: gateway.maintenance_communicator.MaintenanceCommunicator
        """
        self._consumers = {}  # type: Dict[int, Callable[[str], Any]]
        self._privatekey_filename = ssl_private_key
        self._certificate_filename = ssl_certificate
        self._maintenance_communicator = maintenance_communicator
        if self._maintenance_communicator:
            self._maintenance_communicator.set_receiver(self._received_data)
        self._connection = None  # type: Optional[socket.socket]
        self._server_thread = None  # type: Optional[BaseThread]