code: public static TProcessorFactory processorFactoryToTProcessorFactory(final NiftyProcessorFactory niftyProcessorFactory)
      {
          return new TProcessorFactory(null) {
              @Override
              public TProcessor getProcessor(TTransport trans)
              {
                  return processorToTProcessor(niftyProcessorFactory.getProcessor(trans));
              }
          };
      }
docs: Create a standard thrift {@link TProcessorFactory} that delegates to a
  {@link NiftyProcessorFactory} to construct an instance, then adapts each instance to a
  standard Thrift {@link TProcessor}