Esempio n. 1
0
 def listMethods(self):
     result = set()
     for name, handler in self._xmlrpc_server.register.items():
         methods = list_public_methods(handler)
         methods = set('%s.%s' % (name, method) for method in methods)
         result.update(methods)
     return sorted(result)
Esempio n. 2
0
 def listMethods(self):
     result = set()
     for name, handler in self._xmlrpc_server.register.items():
         methods = list_public_methods(handler)
         methods = set('%s.%s' % (name, method) for method in methods)
         result.update(methods)
     return sorted(result)
Esempio n. 3
0
 def register_with(cls, dispatcher):
     """Adds this API's methods to the given dispatcher."""
     for method_name in list_public_methods(cls):
         if method_name != 'register_with':
             method = getattr(cls, method_name)
             full_name = '.'.join((part for part in (cls.namespace, method_name) if part))
             dispatcher.register_function(method, full_name)
Esempio n. 4
0
    def listMethods(self):
        """
            Hack to return public methods of this object via XMLRPC

            :TODO:
                - Make this work
        """
        return list_public_methods(self)
Esempio n. 5
0
 def _listMethods(self):
     """
     Class method listing (required for introspection API).
     """
     m = []
     for x in list_public_methods(self):
         if x.startswith("_"): continue
         if not is_exposed(getattr(self, x)): continue
         m.append(x)
     return m
Esempio n. 6
0
 def _listMethods(self):
     """
     Class method listing (required for introspection API).
     """
     m = []
     for x in list_public_methods(self):
         if x.startswith("_"): continue
         if not is_exposed( getattr(self, x) ): continue
         m.append(x)
     return m
Esempio n. 7
0
 def _listMethods(self):
     return list_public_methods(self)
Esempio n. 8
0
 def _listMethods(self):
     return list_public_methods(self)
Esempio n. 9
0
    def get_public_method(self, method):
        if method not in list_public_methods(self):
            raise AttributeError('Method %r not available' % method)

        return getattr(self, method)
Esempio n. 10
0
    def get_public_method(self, method):
        if method not in list_public_methods(self):
            raise AttributeError('Method %r not available' % method)

        return getattr(self, method)
Esempio n. 11
0
 def _listMethods(self):
     """The convenience function list_public_methods() scans an instance to return the names of callable attributes that do not start with an underscore."""
     # redefine _listMethods() to apply whatever rules are desired.
     return list_public_methods(self)
 def _listMethods(self):
     """The convenience function list_public_methods() scans an instance to return the names of callable attributes that do not start with an underscore."""
     # redefine _listMethods() to apply whatever rules are desired.
     return list_public_methods(self)