Andrew de Andrade created THRIFT-3010:
-----------------------------------------

             Summary: nodejs: expose connection context to handler
                 Key: THRIFT-3010
                 URL: https://issues.apache.org/jira/browse/THRIFT-3010
             Project: Thrift
          Issue Type: Improvement
          Components: Node.js - Compiler
            Reporter: Andrew de Andrade


I want to expose the connection context to the handler functions. I've attached 
a patch for the JS compiler that accomplishes what I want, but I want to see if 
anyone else has an opinion on the correct interface. 

My current approach binds a plain javascript object, {{{ inputProtocol: input, 
outputProtocol: output }}}, to the this._handler.someHandlerFn` so that within 
the handler function you can use {{this.inputProtocol}"  to get access to the 
inputProtocol, which can in turn be used to get access to the input transport.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to