def dispatch(self):
        """This method actually dispatches to specific transport methods
        according to command line parameters.
        """

        self.logger.info('Starting on %s transport' %
                         self.transport.capitalize())
        transports = {
                'amqp': self.start_amqp,
                'http': self.start_resourcefile,
                'file': self.start_resourcefile,
        }
        try:
            transports[self.transport]()
        except KeyError as err:
            self.logger.error("Transport unknown. [%s]" % err)
            self.stop_synapse()
            sys.exit()
dataset/ETHPy150Open comodit/synapse-agent/synapse/dispatcher.py/Dispatcher.dispatch/original