def sendConnect(self, reconnFlag=0, connectCnt=0, proxy_user='', proxy_zone='', client_user='', client_zone='', option=''): log.msg("Starting Connection Request") self.connect_info = {'irodsProt': self.api, 'reconnFlag': reconnFlag, 'connectCnt': connectCnt, 'proxyUser': proxy_user, 'proxyRcatZone': proxy_zone, 'clientUser': client_user, 'clientRcatZone': client_zone, 'option': option} r = Request(**self.api_mapper.connect(reconnFlag=reconnFlag, connectCnt=connectCnt, proxy_user=proxy_user, proxy_zone=proxy_zone, client_user=client_user, client_zone=client_zone, option=option)) d = defer.Deferred() d.addCallback(self.finishConnect) d.addCallback(self.sendNextRequest) r.deferred = d self.request_queue.put(r) return d
def sendDisconnect(self, err_len=0, bs_len=0, int_info=0, data=''): d = defer.Deferred() d.addCallback(self.sendNextRequest) r = Request() r.deferred = d r.msg_type = 'RODS_DISCONNECT' self.request_queue.put(r) return d
def sendApiReq(self, int_info=0, err_len=0, bs_len=0, data='', bs_consumer=None, data_stream_cb=None): d = defer.Deferred() r = Request() r.deferred = d r.msg_type = 'RODS_API_REQ' r.int_info = int_info r.bs_len = bs_len r.err_len = err_len r.data = data r.data_stream_cb = data_stream_cb r.bs_consumer = bs_consumer self.request_queue.put(r) return d