public interface ThriftClient extends AutoCloseable
限定符和类型 | 方法和说明 |
---|---|
org.apache.thrift.protocol.TProtocol |
getProtocol(org.apache.thrift.transport.TTransport transport)
获取Thrift传输协议
|
org.apache.thrift.protocol.TProtocol |
getProtocol(org.apache.thrift.transport.TTransport transport,
String serviceName)
获取Thrift传输协议
当服务器使用MultiplexedProcessor配置多个服务时,需要通过服务名来区分具体的服务.
|
String |
getServerHost()
获取Thrift服务器地址
|
int |
getServerPort()
获取Thrift服务器端口
|
ThriftClientConfiguration |
getThriftClientConfiguration()
获取Thrift服务配置
|
org.apache.thrift.transport.TTransport |
getTransport()
获取Thrift传输类型
需要与服务端相匹配.
|
close
org.apache.thrift.transport.TTransport getTransport() throws IkasoaException
需要与服务端相匹配.
IkasoaException
- 异常org.apache.thrift.protocol.TProtocol getProtocol(org.apache.thrift.transport.TTransport transport)
transport
- 传输类型org.apache.thrift.protocol.TProtocol getProtocol(org.apache.thrift.transport.TTransport transport, String serviceName)
当服务器使用MultiplexedProcessor配置多个服务时,需要通过服务名来区分具体的服务.
serviceName与MultiplexedProcessor中 processorMap 的key相对应.
transport
- 传输类型serviceName
- 服务名String getServerHost()
int getServerPort()
ThriftClientConfiguration getThriftClientConfiguration()
Copyright © 2016–2019. All rights reserved.