Java 类org.apache.thrift.transport.TSaslClientTransport 实例源码

项目:jstrom    文件:DigestSaslTransportPlugin.java   
@Override
public TTransport connect(TTransport transport, String serverHost, String asUser) throws TTransportException, IOException {
    ClientCallbackHandler client_callback_handler = new ClientCallbackHandler(login_conf);
    TSaslClientTransport wrapper_transport =
            new TSaslClientTransport(DIGEST, null, AuthUtils.SERVICE, serverHost, null, client_callback_handler, transport);

    wrapper_transport.open();
    LOG.debug("SASL DIGEST-MD5 client transport has been established");

    return wrapper_transport;
}
项目:RecordServiceClient    文件:ThriftUtils.java   
/**
 * Returns the socket transport backing transport.
 */
static TSocket getSocketTransport(TTransport transport) {
  if (transport instanceof TSaslClientTransport) {
    transport = ((TSaslClientTransport)transport).getUnderlyingTransport();
  }
  Preconditions.checkState(transport instanceof TSocket);
  return (TSocket)transport;
}
项目:incubator-storm    文件:DigestSaslTransportPlugin.java   
public TTransport connect(TTransport transport, String serverHost) throws TTransportException, IOException {
    ClientCallbackHandler client_callback_handler = new ClientCallbackHandler(login_conf);
    TSaslClientTransport wrapper_transport = new TSaslClientTransport(DIGEST, 
            null, 
            AuthUtils.SERVICE, 
            serverHost,
            null,
            client_callback_handler, 
            transport);

    wrapper_transport.open();
    LOG.debug("SASL DIGEST-MD5 client transport has been established");

    return wrapper_transport;
}
项目:storm-resa    文件:DigestSaslTransportPlugin.java   
public TTransport connect(TTransport transport, String serverHost) throws TTransportException, IOException {
    ClientCallbackHandler client_callback_handler = new ClientCallbackHandler(login_conf);
    TSaslClientTransport wrapper_transport = new TSaslClientTransport(DIGEST, 
            null, 
            AuthUtils.SERVICE, 
            serverHost,
            null,
            client_callback_handler, 
            transport);

    wrapper_transport.open();
    LOG.debug("SASL DIGEST-MD5 client transport has been established");

    return wrapper_transport;
}
项目:incubator-sentry    文件:ThriftUtil.java   
/**
 * Returns the underlying TSocket from the transport, or null of the transport type is unknown.
 */
private static TSocket getUnderlyingSocketFromTransport(TTransport transport) {
  Preconditions.checkNotNull(transport);
  if (transport instanceof TSaslServerTransport) {
    return (TSocket) ((TSaslServerTransport) transport).getUnderlyingTransport();
  } else if (transport instanceof TSaslClientTransport) {
    return (TSocket) ((TSaslClientTransport) transport).getUnderlyingTransport();
  } else if (transport instanceof TSocket) {
    return (TSocket) transport;
  }
  return null;
}
项目:jstorm    文件:DigestSaslTransportPlugin.java   
@Override
public TTransport connect(TTransport transport, String serverHost, String asUser) throws TTransportException, IOException {
    ClientCallbackHandler client_callback_handler = new ClientCallbackHandler(login_conf);
    TSaslClientTransport wrapper_transport =
            new TSaslClientTransport(DIGEST, null, AuthUtils.SERVICE, serverHost, null, client_callback_handler, transport);

    wrapper_transport.open();
    LOG.debug("SASL DIGEST-MD5 client transport has been established");

    return wrapper_transport;
}