예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
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)
예제 #4
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
예제 #7
0
 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
예제 #9
0
 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
예제 #10
0
 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
예제 #11
0
 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)
예제 #12
0
 def __init__(self, *args, **kwargs):
     XMLRPC.__init__(self, *args, **kwargs)
     self.recording = Recordings()
     self.log = registry.site_registry().log
예제 #13
0
 def __init__(self, core):
     XMLRPC.__init__(self)
     BaseService.__init__(self, core)
     self.putSubHandler('system', self)
예제 #14
0
파일: site.py 프로젝트: TigerND/dtx-core
 def __init__(self, urls):
     XMLRPC.__init__(self)
     self.urls = urls
     self.handlers = {}
예제 #15
0
 def __init__(self, portal):
     XMLRPC.__init__(self)
     self._sessions = {}
     self.portal = portal
예제 #16
0
 def render(self, request):
     #XXX: check the correctness of this stuff
     self._lastClient = request.transport.getPeer()
     return XMLRPC.render(self, request)
예제 #17
0
 def __init__(self, api):
     self.started = mx.DateTime.now()
     self.api = api 
     self.output = api.output
     XMLRPC.__init__(self, allowNone=True)
예제 #18
0
 def __init__(self, workerm, taskm):
     XMLRPC.__init__(self, allowNone=True)
     self.workerm = workerm
     self.taskm = taskm
예제 #19
0
 def __init__(self, agent):
     XMLRPC.__init__(self)
     self.agent = agent
     self.started = time.time()
예제 #20
0
 def __init__(self, allowNone=False, useDateTime=False):
     XMLRPC.__init__(self, allowNone, useDateTime)
     connection = ConnectionPool()
     self.db = connection.bonusprocessing
     self.cardscollection = self.db.cards
예제 #21
0
 def __init__(self, allowNone=False, useDateTime=False):
     XMLRPC.__init__(self, allowNone, useDateTime)
     connection = ConnectionPool()
     self.db = connection.bonusprocessing
     self.cardscollection = self.db.cards
예제 #22
0
파일: xmlrpc.py 프로젝트: AnatomicJC/mmc
 def __init__(self, config):
     XMLRPC.__init__(self)
     self.logger = logging.getLogger()
     self.config = config
예제 #23
0
 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
예제 #24
0
 def __init__(self, api):
     self.started = mx.DateTime.now()
     self.api = api
     self.output = api.output
     XMLRPC.__init__(self, allowNone=True)
예제 #25
0
 def __init__(self, rgroup, dbpath, port, intro='', pname=''):
     XMLRPC.__init__(self)
     self.d = hashtable.ReplicatedDict(rgroup, dbpath, port, intro, pname)
예제 #26
0
 def __init__(self, workerm, taskm):
     XMLRPC.__init__(self, allowNone=True)
     self.workerm = workerm
     self.taskm = taskm
예제 #27
0
 def __init__(self, urls):
     XMLRPC.__init__(self)
     self.urls = urls
     self.handlers = {}
예제 #28
0
 def __init__(self, rgroup, dbpath, port, intro= '', pname=''):
     XMLRPC.__init__(self)
     self.d = hashtable.ReplicatedDict(rgroup, dbpath, port, intro, pname)
예제 #29
0
 def render(self, request):
     #XXX: check the correctness of this stuff
     self._lastClient = request.transport.getPeer()
     return XMLRPC.render(self, request)
예제 #30
0
파일: xmlrpc.py 프로젝트: gnumaniac/pulse
 def __init__(self, config):
     XMLRPC.__init__(self)
     self.logger = logging.getLogger()
     self.config = config
예제 #31
0
 def __init__(self):
     XMLRPC.__init__(self, allowNone=True)