def messageMethod(name, parameters):
    """ Creates method for dispatching messages.

    @param name name of method as string
    @param parameters list of method argument names
    @return newly created method (as closure)
    """
    def dispatchMethod(self, *arguments):
        self.dispatcher(name, dict(zip(parameters, arguments)))
    dispatchMethod.__name__ = name
    return dispatchMethod