'system.listMethods() => [\'add\', \'subtract\', \'multiple\']
Returns a list of the methods supported by the server.'

def system_listMethods(self):

    methods = self.funcs.keys()
    if (self.instance is not None):
        if hasattr(self.instance, '_listMethods'):
            methods = remove_duplicates((methods + self.instance._listMethods()))
        elif (not hasattr(self.instance, '_dispatch')):
            methods = remove_duplicates((methods + list_public_methods(self.instance)))
    methods.sort()
    return methods
