def __init__(self, config, multitorrent, logger): XMLRPC.__init__(self) self.config = Preferences(config) self.log = logger self.port = self.config['xmlrpc_port'] self.multitorrent = multitorrent multitorrent.rawserver.create_xmlrpc_socket(self.port, self)
def __init__(self, avatarId, protocol): XMLRPC.__init__(self, allowNone=True) self._protocol = protocol self.avatarId = avatarId self.iters = getStat('terane.protocols.xmlrpc.iter.count', 0) self.totalitertime = getStat('terane.protocols.xmlrpc.iter.totaltime', 0.0) self.tails = getStat('terane.protocols.xmlrpc.tail.count', 0) self.totaltailtime = getStat('terane.protocols.xmlrpc.tail.totaltime', 0.0)
def __init__(self, portal): XMLRPC.__init__(self) print "MaayRPCServer init %s" % (portal) self._sessions = {} self.portal = portal self.nodeId = portal.config.get_node_id() self._sessions[WEB_AVATARID] = portal.webQuerier self._sessions[ANONYMOUS_AVATARID] = portal.anonymousQuerier self._lastClient = None MaayRPCServer.theP2pQuerier = P2pQuerier(portal.anonymousQuerier)
def __init__(self, backend): """Constructor for XMLRPCResponseManager""" XMLRPC.__init__(self) self._backend = backend self._procedures = [] for method in dir(self._backend): if not method.startswith("_"): self._procedures.append(method)
def __init__(self, library, host="0.0.0.0", port=8274, port_file=None, allow_stop=True): """Configure remote Twisted-based server. :param: library: Test library instance or module to host. :param: host: """ XMLRPC.__init__(self, allowNone=True) self.server_address = (host, port) self._funcs = {} self._robot = RobotRemoteInterface(library, self) self._allow_stop = allow_stop return
def lookupProcedure(self, procedurePath): try: return XMLRPC.lookupProcedure(self, procedurePath) except xmlrpc.NoSuchFunction: if procedurePath.startswith("SESSION"): raise xmlrpc.Fault(self.SESSION_EXPIRED, "Session non-existant/expired.") else: raise
def _getFunction(self, functionPath): try: return XMLRPC._getFunction(self, functionPath) except xmlrpc.NoSuchFunction: if functionPath.startswith("SESSION"): raise xmlrpc.Fault(self.SESSION_EXPIRED, "Session non-existant/expired.") else: raise
def test_cannotSetDateTime(self): """ Setting L{XMLRPC.useDateTime} to C{True} after initialization raises L{RuntimeError}. """ xmlrpc = XMLRPC(useDateTime=False) self.assertRaises(RuntimeError, setattr, xmlrpc, "useDateTime", True) proxy = Proxy("http://localhost/", useDateTime=False) self.assertRaises(RuntimeError, setattr, proxy, "useDateTime", True)
def __init__(self, *args, **kwargs): XMLRPC.__init__(self, *args, **kwargs) self.recording = Recordings() self.log = registry.site_registry().log
def __init__(self, core): XMLRPC.__init__(self) BaseService.__init__(self, core) self.putSubHandler('system', self)
def __init__(self, urls): XMLRPC.__init__(self) self.urls = urls self.handlers = {}
def __init__(self, portal): XMLRPC.__init__(self) self._sessions = {} self.portal = portal
def render(self, request): #XXX: check the correctness of this stuff self._lastClient = request.transport.getPeer() return XMLRPC.render(self, request)
def __init__(self, api): self.started = mx.DateTime.now() self.api = api self.output = api.output XMLRPC.__init__(self, allowNone=True)
def __init__(self, workerm, taskm): XMLRPC.__init__(self, allowNone=True) self.workerm = workerm self.taskm = taskm
def __init__(self, agent): XMLRPC.__init__(self) self.agent = agent self.started = time.time()
def __init__(self, allowNone=False, useDateTime=False): XMLRPC.__init__(self, allowNone, useDateTime) connection = ConnectionPool() self.db = connection.bonusprocessing self.cardscollection = self.db.cards
def __init__(self, config): XMLRPC.__init__(self) self.logger = logging.getLogger() self.config = config
def __init__(self, config, torrent_queue, logger): XMLRPC.__init__(self) self.config = Preferences(config) self.log = logger self.port = self.config["xmlrpc_port"] self.tq = torrent_queue
def __init__(self, rgroup, dbpath, port, intro='', pname=''): XMLRPC.__init__(self) self.d = hashtable.ReplicatedDict(rgroup, dbpath, port, intro, pname)
def __init__(self, rgroup, dbpath, port, intro= '', pname=''): XMLRPC.__init__(self) self.d = hashtable.ReplicatedDict(rgroup, dbpath, port, intro, pname)
def __init__(self): XMLRPC.__init__(self, allowNone=True)