code: public static TProcessor processorToTProcessor(final NiftyProcessor niftyProcessor)
      {
          return new TProcessor()
          {
              @Override
              public boolean process(TProtocol in, TProtocol out) throws TException
              {
                  try {
                      return niftyProcessor.process(in, out, null).get();
                  } catch (InterruptedException e) {
                      Thread.currentThread().interrupt();
                      throw new TException(e);
                  } catch (ExecutionException e) {
                      throw new TException(e);
                  }
              }
          };
      }
docs: Adapt a {@link NiftyProcessor} to a standard Thrift {@link TProcessor}. The {@link
  com.facebook.nifty.core.NiftyRequestContext} will always be {@code null}