All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lowdad.thrift.client.builder.NormalThriftClientBuilder Maven / Gradle / Ivy

The newest version!
package com.lowdad.thrift.client.builder;

import com.lowdad.thrift.client.NormalThriftClient;
import org.apache.thrift.TServiceClient;

/**
 * @author lowdad
 */
public class NormalThriftClientBuilder {

    private final NormalThriftClient client = new NormalThriftClient<>();

    protected NormalThriftClient build() {
        client.init();
        return client;
    }

    protected NormalThriftClientBuilder setHost(String host) {
        client.setThriftServerHost(host);
        return this;
    }

    protected NormalThriftClientBuilder setPort(int port) {
        client.setThriftServerPort(port);
        return this;
    }

    protected NormalThriftClientBuilder setThriftClass(Class thriftClass) {
        client.setThriftClass(thriftClass);
        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy