Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-819

add Enumeration for protocol, transport and server types

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • 0.10.0
    • C++ - Library
    • None
    • Patch Available

    Description

      I would like to have Enumeration's for protocol, transport and server types.

      I'm doing some testing stuff, and using types for the different parameter's would make it much more comfortable to work with, e.g.

        // Dispatcher
        shared_ptr<TProtocolFactory> protocolFactory;
        if (protocol_type == PROTOCOL_JSON) {
          shared_ptr<TProtocolFactory> jsonProtocolFactory(new TJSONProtocolFactory());
          protocolFactory = jsonProtocolFactory;
        } else
        {
          shared_ptr<TProtocolFactory> binaryProtocolFactory(new TBinaryProtocolFactory());
          protocolFactory = binaryProtocolFactory;
        }
      
      

      aligning these enums across all languages might be another benefit.

      Attachments

        1. THRIFT-819.patch
          2 kB
          Roger Meier

        Issue Links

          Activity

            People

              roger Roger Meier
              roger Roger Meier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Remaining Estimate - 0.5h
                  0.5h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified