Subversion Repositories SmartDukaan

Rev

Rev 94 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 2926
Line 29... Line 29...
29
     - propertyName
29
     - propertyName
30
     - propertyValue
30
     - propertyValue
31
    """
31
    """
32
    pass
32
    pass
33
 
33
 
-
 
34
  def reloadProperties(self, ):
-
 
35
    pass
-
 
36
 
34
 
37
 
35
class Client(Iface):
38
class Client(Iface):
36
  def __init__(self, iprot, oprot=None):
39
  def __init__(self, iprot, oprot=None):
37
    self._iprot = self._oprot = iprot
40
    self._iprot = self._oprot = iprot
38
    if oprot != None:
41
    if oprot != None:
Line 99... Line 102...
99
    result = loadProperty_result()
102
    result = loadProperty_result()
100
    result.read(self._iprot)
103
    result.read(self._iprot)
101
    self._iprot.readMessageEnd()
104
    self._iprot.readMessageEnd()
102
    return
105
    return
103
 
106
 
-
 
107
  def reloadProperties(self, ):
-
 
108
    self.send_reloadProperties()
-
 
109
    self.recv_reloadProperties()
-
 
110
 
-
 
111
  def send_reloadProperties(self, ):
-
 
112
    self._oprot.writeMessageBegin('reloadProperties', TMessageType.CALL, self._seqid)
-
 
113
    args = reloadProperties_args()
-
 
114
    args.write(self._oprot)
-
 
115
    self._oprot.writeMessageEnd()
-
 
116
    self._oprot.trans.flush()
-
 
117
 
-
 
118
  def recv_reloadProperties(self, ):
-
 
119
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
120
    if mtype == TMessageType.EXCEPTION:
-
 
121
      x = TApplicationException()
-
 
122
      x.read(self._iprot)
-
 
123
      self._iprot.readMessageEnd()
-
 
124
      raise x
-
 
125
    result = reloadProperties_result()
-
 
126
    result.read(self._iprot)
-
 
127
    self._iprot.readMessageEnd()
-
 
128
    return
-
 
129
 
104
 
130
 
105
class Processor(Iface, TProcessor):
131
class Processor(Iface, TProcessor):
106
  def __init__(self, handler):
132
  def __init__(self, handler):
107
    self._handler = handler
133
    self._handler = handler
108
    self._processMap = {}
134
    self._processMap = {}
109
    self._processMap["getPropetry"] = Processor.process_getPropetry
135
    self._processMap["getPropetry"] = Processor.process_getPropetry
110
    self._processMap["loadProperty"] = Processor.process_loadProperty
136
    self._processMap["loadProperty"] = Processor.process_loadProperty
-
 
137
    self._processMap["reloadProperties"] = Processor.process_reloadProperties
111
 
138
 
112
  def process(self, iprot, oprot):
139
  def process(self, iprot, oprot):
113
    (name, type, seqid) = iprot.readMessageBegin()
140
    (name, type, seqid) = iprot.readMessageBegin()
114
    if name not in self._processMap:
141
    if name not in self._processMap:
115
      iprot.skip(TType.STRUCT)
142
      iprot.skip(TType.STRUCT)
Line 147... Line 174...
147
    oprot.writeMessageBegin("loadProperty", TMessageType.REPLY, seqid)
174
    oprot.writeMessageBegin("loadProperty", TMessageType.REPLY, seqid)
148
    result.write(oprot)
175
    result.write(oprot)
149
    oprot.writeMessageEnd()
176
    oprot.writeMessageEnd()
150
    oprot.trans.flush()
177
    oprot.trans.flush()
151
 
178
 
-
 
179
  def process_reloadProperties(self, seqid, iprot, oprot):
-
 
180
    args = reloadProperties_args()
-
 
181
    args.read(iprot)
-
 
182
    iprot.readMessageEnd()
-
 
183
    result = reloadProperties_result()
-
 
184
    self._handler.reloadProperties()
-
 
185
    oprot.writeMessageBegin("reloadProperties", TMessageType.REPLY, seqid)
-
 
186
    result.write(oprot)
-
 
187
    oprot.writeMessageEnd()
-
 
188
    oprot.trans.flush()
-
 
189
 
152
 
190
 
153
# HELPER FUNCTIONS AND STRUCTURES
191
# HELPER FUNCTIONS AND STRUCTURES
154
 
192
 
155
class getPropetry_args:
193
class getPropetry_args:
156
  """
194
  """
Line 371... Line 409...
371
    oprot.writeFieldStop()
409
    oprot.writeFieldStop()
372
    oprot.writeStructEnd()
410
    oprot.writeStructEnd()
373
 
411
 
374
  def __repr__(self):
412
  def __repr__(self):
375
    L = ['%s=%r' % (key, value)
413
    L = ['%s=%r' % (key, value)
-
 
414
      for key, value in self.__dict__.iteritems()]
-
 
415
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
416
 
-
 
417
  def __eq__(self, other):
-
 
418
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
419
 
-
 
420
  def __ne__(self, other):
-
 
421
    return not (self == other)
-
 
422
 
-
 
423
class reloadProperties_args:
-
 
424
 
-
 
425
  thrift_spec = (
-
 
426
  )
-
 
427
 
-
 
428
  def read(self, iprot):
-
 
429
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
430
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
431
      return
-
 
432
    iprot.readStructBegin()
-
 
433
    while True:
-
 
434
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
435
      if ftype == TType.STOP:
-
 
436
        break
-
 
437
      else:
-
 
438
        iprot.skip(ftype)
-
 
439
      iprot.readFieldEnd()
-
 
440
    iprot.readStructEnd()
-
 
441
 
-
 
442
  def write(self, oprot):
-
 
443
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
444
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
445
      return
-
 
446
    oprot.writeStructBegin('reloadProperties_args')
-
 
447
    oprot.writeFieldStop()
-
 
448
    oprot.writeStructEnd()
-
 
449
 
-
 
450
  def __repr__(self):
-
 
451
    L = ['%s=%r' % (key, value)
-
 
452
      for key, value in self.__dict__.iteritems()]
-
 
453
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
454
 
-
 
455
  def __eq__(self, other):
-
 
456
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
457
 
-
 
458
  def __ne__(self, other):
-
 
459
    return not (self == other)
-
 
460
 
-
 
461
class reloadProperties_result:
-
 
462
 
-
 
463
  thrift_spec = (
-
 
464
  )
-
 
465
 
-
 
466
  def read(self, iprot):
-
 
467
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
468
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
469
      return
-
 
470
    iprot.readStructBegin()
-
 
471
    while True:
-
 
472
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
473
      if ftype == TType.STOP:
-
 
474
        break
-
 
475
      else:
-
 
476
        iprot.skip(ftype)
-
 
477
      iprot.readFieldEnd()
-
 
478
    iprot.readStructEnd()
-
 
479
 
-
 
480
  def write(self, oprot):
-
 
481
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
482
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
483
      return
-
 
484
    oprot.writeStructBegin('reloadProperties_result')
-
 
485
    oprot.writeFieldStop()
-
 
486
    oprot.writeStructEnd()
-
 
487
 
-
 
488
  def __repr__(self):
-
 
489
    L = ['%s=%r' % (key, value)
376
      for key, value in self.__dict__.iteritems()]
490
      for key, value in self.__dict__.iteritems()]
377
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
491
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
378
 
492
 
379
  def __eq__(self, other):
493
  def __eq__(self, other):
380
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
494
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__