com.lowdad.thrift.client.builder.NormalThriftClientBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rpc-client Show documentation
Show all versions of rpc-client Show documentation
RPC client for k8s services
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;
}
}