Search in sources :

Example 1 with TTransport

use of org.apache.thrift7.transport.TTransport in project storm by nathanmarz.

the class SimpleTransportPlugin method connect.

/**
     * Connect to the specified server via framed transport 
     * @param transport The underlying Thrift transport.
     */
public TTransport connect(TTransport transport, String serverHost) throws TTransportException {
    //create a framed transport
    TTransport conn = new TFramedTransport(transport);
    //connect
    conn.open();
    LOG.debug("Simple client transport has been established");
    return conn;
}
Also used : TFramedTransport(org.apache.thrift7.transport.TFramedTransport) TTransport(org.apache.thrift7.transport.TTransport)

Example 2 with TTransport

use of org.apache.thrift7.transport.TTransport in project storm by nathanmarz.

the class DigestSaslTransportPlugin method connect.

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;
}
Also used : TSaslClientTransport(org.apache.thrift7.transport.TSaslClientTransport)

Aggregations

TFramedTransport (org.apache.thrift7.transport.TFramedTransport)1 TSaslClientTransport (org.apache.thrift7.transport.TSaslClientTransport)1 TTransport (org.apache.thrift7.transport.TTransport)1