def add_handler(self, iface_name, handler):
        """
        Associates the given handler with the interface name.  If the interface does not exist in
        the Contract, an RpcException is raised.

        :Parameters:
          iface_name
            Name of interface that this handler implements
          handler
            Instance of a class that implements all functions defined on the interface
        """
        if self.contract.has_interface(iface_name):
            self.handlers[iface_name] = handler
        else:
            raise RpcException(ERR_INVALID_REQ, "Unknown interface: '%s'" % iface_name)
dataset/ETHPy150Open StackHut/stackhut/stackhut_toolkit/common/barrister/runtime.py/Server.add_handler/original