@Override
          public TTransport run() {
            try {
              return wrapped.getTransport(trans);
            } catch (TTransportException e) {
              cause = e;
              return null;
            } catch (RuntimeException re) {
              /*
               * One cause can be:
               *    org.apache.thrift.transport.TSaslTransportException: No data or no sasl data in the stream
               * Others are possible.
               *
               * Get rid of RuntimeException.
               */
              cause = re.getCause();
              return null;
            }
          }
A TransportFactory that wraps another one, but assumes a specified UGI
before calling through.

This is used on the server side to assume the server's Principal when accepting
clients.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/security/HadoopThriftAuthBridge.java