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

Importing service functions (simulation multiple inheritance)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.9.2
    • None
    • None
    • Patch Available

    Description

      Hello,

      based on my thread in mailing list ("multiple inharitance of services" on thrift-dev) I've prepared experimenal patch (http://helemik.cz/juzna/opensource/php/thrift/import.patch)
      You can see my problems at http://mail-archives.apache.org/mod_mbox/incubator-thrift-dev/201005.mbox/%3CAANLkTillWh6cA79oxMqXkT8U0hBitsmUmUUscRTi4B_1@mail.gmail.com%3E

      My example solution:
      service Mikrotik extends ap.AccessPoint { // Same as before
      // Diagnostics
      import diag.Diagnostics // this is new, imports functions from diag.thrift file, service Diagnostics

      // Blocking users
      import block.Blocking // this is new

      void dummy(1: string params)
      }

      "Import" directive just copies methods from parent services to the new one. It includes any parents if imported services.

      What do you think about it?

      Attachments

        Activity

          People

            Unassigned Unassigned
            juzna.cz Jan Dolecek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2m
                2m
                Remaining:
                Remaining Estimate - 2m
                2m
                Logged:
                Time Spent - Not Specified
                Not Specified