public class RpcClientPool extends Object
| 构造器和说明 |
|---|
RpcClientPool(String addres,
int port,
int maxPoolSize,
int timeOut,
String token,
String connectionId,
String localPublicKey)
Constructor.
|
RpcClientPool(String addres,
int port,
int maxPoolSize,
String token,
String connectionId,
String localPublicKey)
Constructor.
|
RpcClientPool(String addres,
int port,
String token,
String connectionId,
String localPublicKey)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
drop()
Description: 销毁连接池.
|
String |
getAddres() |
RpcClient |
getClient()
Description: 拿走一个链接对象.
|
int |
getMaxPoolSize() |
int |
getPort() |
int |
getTimeOut() |
void |
returnClient(RpcClient client)
Description: 归还链接对象.
|
public RpcClientPool(String addres, int port, String token, String connectionId, String localPublicKey) throws IOException, Exception
addres - port - token - connectionId - localPublicKey - IOExceptionExceptionpublic RpcClientPool(String addres, int port, int maxPoolSize, String token, String connectionId, String localPublicKey) throws IOException, Exception
addres - port - maxPoolSize - token - connectionId - localPublicKey - IOExceptionExceptionpublic RpcClientPool(String addres, int port, int maxPoolSize, int timeOut, String token, String connectionId, String localPublicKey) throws IOException, Exception
addres - port - maxPoolSize - timeOut - token - connectionId - localPublicKey - IOExceptionExceptionpublic RpcClient getClient() throws IOException, Exception
IOExceptionExceptionpublic void returnClient(RpcClient client)
client - public void drop()
public int getMaxPoolSize()
public String getAddres()
public int getPort()
public int getTimeOut()
Copyright © 2019. All Rights Reserved.