Example usage for org.apache.thrift.transport TSSLTransportFactory.TSSLTransportParameters TSSLTransportFactory.TSSLTransportParameters

List of usage examples for org.apache.thrift.transport TSSLTransportFactory.TSSLTransportParameters TSSLTransportFactory.TSSLTransportParameters

Introduction

In this page you can find the example usage for org.apache.thrift.transport TSSLTransportFactory.TSSLTransportParameters TSSLTransportFactory.TSSLTransportParameters.

Prototype

TSSLTransportFactory.TSSLTransportParameters

Source Link

Usage

From source file:org.apache.cassandra.thrift.SecureTFramedTransportFactory.java

License:Apache License

public TTransport openTransport(String host, int port, Configuration conf) throws TTransportException {
    TSSLTransportFactory.TSSLTransportParameters tsslTransportParameters = new TSSLTransportFactory.TSSLTransportParameters();
    tsslTransportParameters.setTrustStore(conf.get("ssl.truststore", null),
            conf.get("ssl.truststore.password", null));

    TTransport transport = new TFramedTransport(
            TSSLTransportFactory.getClientSocket(host, port, 30000, tsslTransportParameters));
    return transport;
}