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

Add event handlers for processor events

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 0.9
    • 0.10.0
    • Java - Library
    • None
    • all

    • Patch Available

    Description

      Integrates some code we've been using (here at facebook) to add event handlers that can handle processor events with the server event handlers in apache thrift.

      Processor events include: preRead (before reading arguments), postRead (after reading arguments), preWrite (before writing results), postWrite (after writing results), and processorError (when a non-IDL exception is thrown as a result of an error handling the request). The processor handler is given the method name and input and output protocol that will be used to process the request, and can inspect arguments on postRead, and results on pre/postWrite events.

      This change also enables event handlers for non-blocking servers.

      Some unit tests are included to exercise the new processor event handlers, and demonstrate how they can connect with server event handlers.

      It also fixes a minor bug I found while testing, where FrameBuffers on non-blocking servers could have been close()'d more than once.

      Attachments

        Activity

          People

            andrewcox79 Andrew Cox
            andrewcox79 Andrew Cox
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: