Exemplo n.º 1
0
    def findObjectById(self, id, context = ServantProxy.mapcls_context()):
        oos = tarscore.TarsOutputStream();
        oos.write(tarscore.string, 1, id);

        rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectById", oos.getBuffer(), context, None);

        ios = tarscore.TarsInputStream(rsp.sBuffer);
        ret = ios.read(tarscore.vctclass(EndpointF), 0, True);

        return (ret);
Exemplo n.º 2
0
    def findObjectByIdInSameSet(self, id, setId, context = ServantProxy.mapcls_context()):
        oos = tarscore.TarsOutputStream();
        oos.write(tarscore.string, 1, id);
        oos.write(tarscore.string, 2, setId);

        rsp = self.tars_invoke(ServantProxy.TARSNORMAL, "findObjectByIdInSameSet", oos.getBuffer(), context, None);

        ios = tarscore.TarsInputStream(rsp.sBuffer);
        ret = ios.read(tarscore.int32, 0, True);
        activeEp = ios.read(tarscore.vctclass(EndpointF), 3, True);
        inactiveEp = ios.read(tarscore.vctclass(EndpointF), 4, True);

        return (ret, activeEp, inactiveEp);
Exemplo n.º 3
0
    def async_findObjectByIdInSameGroup(self, callback, id, context = ServantProxy.mapcls_context()):
        oos = tarscore.TarsOutputStream();
        oos.write(tarscore.string, 1, id);

        rsp = self.tars_invoke_async(ServantProxy.TARSNORMAL, "findObjectByIdInSameGroup", oos.getBuffer(), context, None, callback);