Modified ThriftFactory so it can use any TProtocol