Subversion Repositories SmartDukaan

Rev

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

Rev 1013 Rev 2926
Line 29... Line 29...
29
 
29
 
30
    public String getPropetry(String propertyName) throws ConfigException, TException;
30
    public String getPropetry(String propertyName) throws ConfigException, TException;
31
 
31
 
32
    public void loadProperty(String propertyName, String propertyValue) throws TException;
32
    public void loadProperty(String propertyName, String propertyValue) throws TException;
33
 
33
 
-
 
34
    public void reloadProperties() throws TException;
-
 
35
 
34
  }
36
  }
35
 
37
 
36
  public static class Client implements Iface {
38
  public static class Client implements Iface {
37
    public Client(TProtocol prot)
39
    public Client(TProtocol prot)
38
    {
40
    {
Line 125... Line 127...
125
      result.read(iprot_);
127
      result.read(iprot_);
126
      iprot_.readMessageEnd();
128
      iprot_.readMessageEnd();
127
      return;
129
      return;
128
    }
130
    }
129
 
131
 
-
 
132
    public void reloadProperties() throws TException
-
 
133
    {
-
 
134
      send_reloadProperties();
-
 
135
      recv_reloadProperties();
-
 
136
    }
-
 
137
 
-
 
138
    public void send_reloadProperties() throws TException
-
 
139
    {
-
 
140
      oprot_.writeMessageBegin(new TMessage("reloadProperties", TMessageType.CALL, seqid_));
-
 
141
      reloadProperties_args args = new reloadProperties_args();
-
 
142
      args.write(oprot_);
-
 
143
      oprot_.writeMessageEnd();
-
 
144
      oprot_.getTransport().flush();
-
 
145
    }
-
 
146
 
-
 
147
    public void recv_reloadProperties() throws TException
-
 
148
    {
-
 
149
      TMessage msg = iprot_.readMessageBegin();
-
 
150
      if (msg.type == TMessageType.EXCEPTION) {
-
 
151
        TApplicationException x = TApplicationException.read(iprot_);
-
 
152
        iprot_.readMessageEnd();
-
 
153
        throw x;
-
 
154
      }
-
 
155
      reloadProperties_result result = new reloadProperties_result();
-
 
156
      result.read(iprot_);
-
 
157
      iprot_.readMessageEnd();
-
 
158
      return;
-
 
159
    }
-
 
160
 
130
  }
161
  }
131
  public static class Processor implements TProcessor {
162
  public static class Processor implements TProcessor {
132
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
163
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
133
    public Processor(Iface iface)
164
    public Processor(Iface iface)
134
    {
165
    {
135
      iface_ = iface;
166
      iface_ = iface;
136
      processMap_.put("getPropetry", new getPropetry());
167
      processMap_.put("getPropetry", new getPropetry());
137
      processMap_.put("loadProperty", new loadProperty());
168
      processMap_.put("loadProperty", new loadProperty());
-
 
169
      processMap_.put("reloadProperties", new reloadProperties());
138
    }
170
    }
139
 
171
 
140
    protected static interface ProcessFunction {
172
    protected static interface ProcessFunction {
141
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
173
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
142
    }
174
    }
Line 204... Line 236...
204
        oprot.getTransport().flush();
236
        oprot.getTransport().flush();
205
      }
237
      }
206
 
238
 
207
    }
239
    }
208
 
240
 
-
 
241
    private class reloadProperties implements ProcessFunction {
-
 
242
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
243
      {
-
 
244
        reloadProperties_args args = new reloadProperties_args();
-
 
245
        args.read(iprot);
-
 
246
        iprot.readMessageEnd();
-
 
247
        reloadProperties_result result = new reloadProperties_result();
-
 
248
        iface_.reloadProperties();
-
 
249
        oprot.writeMessageBegin(new TMessage("reloadProperties", TMessageType.REPLY, seqid));
-
 
250
        result.write(oprot);
-
 
251
        oprot.writeMessageEnd();
-
 
252
        oprot.getTransport().flush();
-
 
253
      }
-
 
254
 
-
 
255
    }
-
 
256
 
209
  }
257
  }
210
 
258
 
211
  public static class getPropetry_args implements TBase<getPropetry_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPropetry_args>   {
259
  public static class getPropetry_args implements TBase<getPropetry_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPropetry_args>   {
212
    private static final TStruct STRUCT_DESC = new TStruct("getPropetry_args");
260
    private static final TStruct STRUCT_DESC = new TStruct("getPropetry_args");
213
 
261
 
Line 1399... Line 1447...
1399
      boolean first = true;
1447
      boolean first = true;
1400
 
1448
 
1401
      sb.append(")");
1449
      sb.append(")");
1402
      return sb.toString();
1450
      return sb.toString();
1403
    }
1451
    }
-
 
1452
 
-
 
1453
    public void validate() throws TException {
-
 
1454
      // check for required fields
-
 
1455
    }
-
 
1456
 
-
 
1457
  }
-
 
1458
 
-
 
1459
  public static class reloadProperties_args implements TBase<reloadProperties_args._Fields>, java.io.Serializable, Cloneable, Comparable<reloadProperties_args>   {
-
 
1460
    private static final TStruct STRUCT_DESC = new TStruct("reloadProperties_args");
-
 
1461
 
-
 
1462
 
-
 
1463
 
-
 
1464
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1465
    public enum _Fields implements TFieldIdEnum {
-
 
1466
;
-
 
1467
 
-
 
1468
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1469
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1470
 
-
 
1471
      static {
-
 
1472
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1473
          byId.put((int)field._thriftId, field);
-
 
1474
          byName.put(field.getFieldName(), field);
-
 
1475
        }
-
 
1476
      }
-
 
1477
 
-
 
1478
      /**
-
 
1479
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1480
       */
-
 
1481
      public static _Fields findByThriftId(int fieldId) {
-
 
1482
        return byId.get(fieldId);
-
 
1483
      }
-
 
1484
 
-
 
1485
      /**
-
 
1486
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1487
       * if it is not found.
-
 
1488
       */
-
 
1489
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1490
        _Fields fields = findByThriftId(fieldId);
-
 
1491
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1492
        return fields;
-
 
1493
      }
-
 
1494
 
-
 
1495
      /**
-
 
1496
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1497
       */
-
 
1498
      public static _Fields findByName(String name) {
-
 
1499
        return byName.get(name);
-
 
1500
      }
-
 
1501
 
-
 
1502
      private final short _thriftId;
-
 
1503
      private final String _fieldName;
-
 
1504
 
-
 
1505
      _Fields(short thriftId, String fieldName) {
-
 
1506
        _thriftId = thriftId;
-
 
1507
        _fieldName = fieldName;
-
 
1508
      }
-
 
1509
 
-
 
1510
      public short getThriftFieldId() {
-
 
1511
        return _thriftId;
-
 
1512
      }
-
 
1513
 
-
 
1514
      public String getFieldName() {
-
 
1515
        return _fieldName;
-
 
1516
      }
-
 
1517
    }
-
 
1518
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
1519
    }});
-
 
1520
 
-
 
1521
    static {
-
 
1522
      FieldMetaData.addStructMetaDataMap(reloadProperties_args.class, metaDataMap);
-
 
1523
    }
-
 
1524
 
-
 
1525
    public reloadProperties_args() {
-
 
1526
    }
-
 
1527
 
-
 
1528
    /**
-
 
1529
     * Performs a deep copy on <i>other</i>.
-
 
1530
     */
-
 
1531
    public reloadProperties_args(reloadProperties_args other) {
-
 
1532
    }
-
 
1533
 
-
 
1534
    public reloadProperties_args deepCopy() {
-
 
1535
      return new reloadProperties_args(this);
-
 
1536
    }
-
 
1537
 
-
 
1538
    @Deprecated
-
 
1539
    public reloadProperties_args clone() {
-
 
1540
      return new reloadProperties_args(this);
-
 
1541
    }
-
 
1542
 
-
 
1543
    public void setFieldValue(_Fields field, Object value) {
-
 
1544
      switch (field) {
-
 
1545
      }
-
 
1546
    }
-
 
1547
 
-
 
1548
    public void setFieldValue(int fieldID, Object value) {
-
 
1549
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
1550
    }
-
 
1551
 
-
 
1552
    public Object getFieldValue(_Fields field) {
-
 
1553
      switch (field) {
-
 
1554
      }
-
 
1555
      throw new IllegalStateException();
-
 
1556
    }
-
 
1557
 
-
 
1558
    public Object getFieldValue(int fieldId) {
-
 
1559
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
1560
    }
-
 
1561
 
-
 
1562
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
1563
    public boolean isSet(_Fields field) {
-
 
1564
      switch (field) {
-
 
1565
      }
-
 
1566
      throw new IllegalStateException();
-
 
1567
    }
-
 
1568
 
-
 
1569
    public boolean isSet(int fieldID) {
-
 
1570
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
1571
    }
-
 
1572
 
-
 
1573
    @Override
-
 
1574
    public boolean equals(Object that) {
-
 
1575
      if (that == null)
-
 
1576
        return false;
-
 
1577
      if (that instanceof reloadProperties_args)
-
 
1578
        return this.equals((reloadProperties_args)that);
-
 
1579
      return false;
-
 
1580
    }
-
 
1581
 
-
 
1582
    public boolean equals(reloadProperties_args that) {
-
 
1583
      if (that == null)
-
 
1584
        return false;
-
 
1585
 
-
 
1586
      return true;
-
 
1587
    }
-
 
1588
 
-
 
1589
    @Override
-
 
1590
    public int hashCode() {
-
 
1591
      return 0;
-
 
1592
    }
-
 
1593
 
-
 
1594
    public int compareTo(reloadProperties_args other) {
-
 
1595
      if (!getClass().equals(other.getClass())) {
-
 
1596
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1597
      }
-
 
1598
 
-
 
1599
      int lastComparison = 0;
-
 
1600
      reloadProperties_args typedOther = (reloadProperties_args)other;
-
 
1601
 
-
 
1602
      return 0;
-
 
1603
    }
-
 
1604
 
-
 
1605
    public void read(TProtocol iprot) throws TException {
-
 
1606
      TField field;
-
 
1607
      iprot.readStructBegin();
-
 
1608
      while (true)
-
 
1609
      {
-
 
1610
        field = iprot.readFieldBegin();
-
 
1611
        if (field.type == TType.STOP) { 
-
 
1612
          break;
-
 
1613
        }
-
 
1614
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
1615
        if (fieldId == null) {
-
 
1616
          TProtocolUtil.skip(iprot, field.type);
-
 
1617
        } else {
-
 
1618
          switch (fieldId) {
-
 
1619
          }
-
 
1620
          iprot.readFieldEnd();
-
 
1621
        }
-
 
1622
      }
-
 
1623
      iprot.readStructEnd();
-
 
1624
      validate();
-
 
1625
    }
-
 
1626
 
-
 
1627
    public void write(TProtocol oprot) throws TException {
-
 
1628
      validate();
-
 
1629
 
-
 
1630
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1631
      oprot.writeFieldStop();
-
 
1632
      oprot.writeStructEnd();
-
 
1633
    }
-
 
1634
 
-
 
1635
    @Override
-
 
1636
    public String toString() {
-
 
1637
      StringBuilder sb = new StringBuilder("reloadProperties_args(");
-
 
1638
      boolean first = true;
-
 
1639
 
-
 
1640
      sb.append(")");
-
 
1641
      return sb.toString();
-
 
1642
    }
-
 
1643
 
-
 
1644
    public void validate() throws TException {
-
 
1645
      // check for required fields
-
 
1646
    }
-
 
1647
 
-
 
1648
  }
-
 
1649
 
-
 
1650
  public static class reloadProperties_result implements TBase<reloadProperties_result._Fields>, java.io.Serializable, Cloneable, Comparable<reloadProperties_result>   {
-
 
1651
    private static final TStruct STRUCT_DESC = new TStruct("reloadProperties_result");
-
 
1652
 
-
 
1653
 
-
 
1654
 
-
 
1655
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1656
    public enum _Fields implements TFieldIdEnum {
-
 
1657
;
-
 
1658
 
-
 
1659
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1660
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1661
 
-
 
1662
      static {
-
 
1663
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1664
          byId.put((int)field._thriftId, field);
-
 
1665
          byName.put(field.getFieldName(), field);
-
 
1666
        }
-
 
1667
      }
-
 
1668
 
-
 
1669
      /**
-
 
1670
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1671
       */
-
 
1672
      public static _Fields findByThriftId(int fieldId) {
-
 
1673
        return byId.get(fieldId);
-
 
1674
      }
-
 
1675
 
-
 
1676
      /**
-
 
1677
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1678
       * if it is not found.
-
 
1679
       */
-
 
1680
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1681
        _Fields fields = findByThriftId(fieldId);
-
 
1682
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1683
        return fields;
-
 
1684
      }
-
 
1685
 
-
 
1686
      /**
-
 
1687
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1688
       */
-
 
1689
      public static _Fields findByName(String name) {
-
 
1690
        return byName.get(name);
-
 
1691
      }
-
 
1692
 
-
 
1693
      private final short _thriftId;
-
 
1694
      private final String _fieldName;
-
 
1695
 
-
 
1696
      _Fields(short thriftId, String fieldName) {
-
 
1697
        _thriftId = thriftId;
-
 
1698
        _fieldName = fieldName;
-
 
1699
      }
-
 
1700
 
-
 
1701
      public short getThriftFieldId() {
-
 
1702
        return _thriftId;
-
 
1703
      }
-
 
1704
 
-
 
1705
      public String getFieldName() {
-
 
1706
        return _fieldName;
-
 
1707
      }
-
 
1708
    }
-
 
1709
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
1710
    }});
-
 
1711
 
-
 
1712
    static {
-
 
1713
      FieldMetaData.addStructMetaDataMap(reloadProperties_result.class, metaDataMap);
-
 
1714
    }
-
 
1715
 
-
 
1716
    public reloadProperties_result() {
-
 
1717
    }
-
 
1718
 
-
 
1719
    /**
-
 
1720
     * Performs a deep copy on <i>other</i>.
-
 
1721
     */
-
 
1722
    public reloadProperties_result(reloadProperties_result other) {
-
 
1723
    }
-
 
1724
 
-
 
1725
    public reloadProperties_result deepCopy() {
-
 
1726
      return new reloadProperties_result(this);
-
 
1727
    }
-
 
1728
 
-
 
1729
    @Deprecated
-
 
1730
    public reloadProperties_result clone() {
-
 
1731
      return new reloadProperties_result(this);
-
 
1732
    }
-
 
1733
 
-
 
1734
    public void setFieldValue(_Fields field, Object value) {
-
 
1735
      switch (field) {
-
 
1736
      }
-
 
1737
    }
-
 
1738
 
-
 
1739
    public void setFieldValue(int fieldID, Object value) {
-
 
1740
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
1741
    }
-
 
1742
 
-
 
1743
    public Object getFieldValue(_Fields field) {
-
 
1744
      switch (field) {
-
 
1745
      }
-
 
1746
      throw new IllegalStateException();
-
 
1747
    }
-
 
1748
 
-
 
1749
    public Object getFieldValue(int fieldId) {
-
 
1750
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
1751
    }
-
 
1752
 
-
 
1753
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
1754
    public boolean isSet(_Fields field) {
-
 
1755
      switch (field) {
-
 
1756
      }
-
 
1757
      throw new IllegalStateException();
-
 
1758
    }
-
 
1759
 
-
 
1760
    public boolean isSet(int fieldID) {
-
 
1761
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
1762
    }
-
 
1763
 
-
 
1764
    @Override
-
 
1765
    public boolean equals(Object that) {
-
 
1766
      if (that == null)
-
 
1767
        return false;
-
 
1768
      if (that instanceof reloadProperties_result)
-
 
1769
        return this.equals((reloadProperties_result)that);
-
 
1770
      return false;
-
 
1771
    }
-
 
1772
 
-
 
1773
    public boolean equals(reloadProperties_result that) {
-
 
1774
      if (that == null)
-
 
1775
        return false;
-
 
1776
 
-
 
1777
      return true;
-
 
1778
    }
-
 
1779
 
-
 
1780
    @Override
-
 
1781
    public int hashCode() {
-
 
1782
      return 0;
-
 
1783
    }
-
 
1784
 
-
 
1785
    public int compareTo(reloadProperties_result other) {
-
 
1786
      if (!getClass().equals(other.getClass())) {
-
 
1787
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1788
      }
-
 
1789
 
-
 
1790
      int lastComparison = 0;
-
 
1791
      reloadProperties_result typedOther = (reloadProperties_result)other;
-
 
1792
 
-
 
1793
      return 0;
-
 
1794
    }
-
 
1795
 
-
 
1796
    public void read(TProtocol iprot) throws TException {
-
 
1797
      TField field;
-
 
1798
      iprot.readStructBegin();
-
 
1799
      while (true)
-
 
1800
      {
-
 
1801
        field = iprot.readFieldBegin();
-
 
1802
        if (field.type == TType.STOP) { 
-
 
1803
          break;
-
 
1804
        }
-
 
1805
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
1806
        if (fieldId == null) {
-
 
1807
          TProtocolUtil.skip(iprot, field.type);
-
 
1808
        } else {
-
 
1809
          switch (fieldId) {
-
 
1810
          }
-
 
1811
          iprot.readFieldEnd();
-
 
1812
        }
-
 
1813
      }
-
 
1814
      iprot.readStructEnd();
-
 
1815
      validate();
-
 
1816
    }
-
 
1817
 
-
 
1818
    public void write(TProtocol oprot) throws TException {
-
 
1819
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1820
 
-
 
1821
      oprot.writeFieldStop();
-
 
1822
      oprot.writeStructEnd();
-
 
1823
    }
-
 
1824
 
-
 
1825
    @Override
-
 
1826
    public String toString() {
-
 
1827
      StringBuilder sb = new StringBuilder("reloadProperties_result(");
-
 
1828
      boolean first = true;
-
 
1829
 
-
 
1830
      sb.append(")");
-
 
1831
      return sb.toString();
-
 
1832
    }
1404
 
1833
 
1405
    public void validate() throws TException {
1834
    public void validate() throws TException {
1406
      // check for required fields
1835
      // check for required fields
1407
    }
1836
    }
1408
 
1837