code: public static TFactoryBasedThreadPoolServer createNewServer(
      TProcessor processor, ServerSocket serverSocket, int socketTimeOut)
      throws IOException {
      TServerSocket socket = new TServerSocket(serverSocket, socketTimeOut);
      TFactoryBasedThreadPoolServer.Args args =
        new TFactoryBasedThreadPoolServer.Args(socket);
      args.stopTimeoutVal = 0;
      args.processor(processor);
      args.transportFactory(new TFramedTransport.Factory());
      args.protocolFactory(new TBinaryProtocol.Factory(true, true));
      return new TFactoryBasedThreadPoolServer(
        args, new TFactoryBasedThreadPoolServer.DaemonThreadFactory());
  
    }
docs: This is a helper method which creates a TFactoryBased..Server object using
  the processor, ServerSocket object and socket timeout limit. This is useful
  when we change the mechanism of server object creation. As a result,
  we don't have to change code in multiple places.
  @param processor
  @param serverSocket
  @param socketTimeOut
  @return A TFactoryBasedThreadPoolServer object
  @throws IOException