THRIFT-928. cpp: Thrift Server Client Stats

Add the ability for Thrift servers to monitor client connections.  It is
activated by #including server/TClientInfo.h and creating 1) a
TClientInfoCallHandler passed to the processor with setEventHandler()
and 2) a TClientInforServerHandler passed to the server with
setServerEventHandler().

The result vector, showing active connections, provides client address
and the thrift call it is executing (or last executed), the time
connected, and the number of calls made since connection.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005139 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/TProcessor.h b/lib/cpp/src/TProcessor.h
index 7858166..16b46df 100644
--- a/lib/cpp/src/TProcessor.h
+++ b/lib/cpp/src/TProcessor.h
@@ -44,7 +44,7 @@
    * The return value is passed to all other callbacks
    * for that function invocation.
    */
-  virtual void* getContext(const char* fn_name) { return NULL; }
+  virtual void* getContext(const char* fn_name, void* serverContext) { return NULL; }
 
   /**
    * Expected to free resources associated with a context.
@@ -112,10 +112,12 @@
   virtual ~TProcessor() {}
 
   virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
-                       boost::shared_ptr<protocol::TProtocol> out) = 0;
+                       boost::shared_ptr<protocol::TProtocol> out,
+                       void* connectionContext) = 0;
 
-  bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> io) {
-    return process(io, io);
+  bool process(boost::shared_ptr<apache::thrift::protocol::TProtocol> io,
+               void* connectionContext) {
+    return process(io, io, connectionContext);
   }
 
   boost::shared_ptr<TProcessorEventHandler> getEventHandler() {