public final class DefaultClientCfg extends Object implements IClientCfg
Modifier and Type | Class and Description |
---|---|
static class |
DefaultClientCfg.Builder |
Modifier and Type | Method and Description |
---|---|
static DefaultClientCfg.Builder |
builder() |
int |
getBufferSize()
获取缓冲区大小
|
String |
getCharset()
获取字符编码
|
String |
getClientName()
获取客户端名称
|
int |
getConnectionTimeout()
获取连接超时时间(秒)
|
int |
getExecutorCount()
获取执行线程数量
|
int |
getHeartbeatInterval()
获取心跳包发送间隔(秒)
|
String |
getParam(String key)
获取客户端自定义参数值
|
String |
getParam(String key,
String defaultValue)
获取客户端自定义参数值
|
Map<String,String> |
getParams()
获取客户端自定义参数映射
|
int |
getPort()
获取远程服务监听端口
|
int |
getReconnectionInterval()
获取断线重连检测间隔(秒)
|
String |
getRemoteHost()
获取远程主机名称或IP地址
|
public static DefaultClientCfg.Builder builder()
public String getClientName()
IClientCfg
getClientName
in interface IClientCfg
public String getRemoteHost()
IClientCfg
getRemoteHost
in interface IClientCfg
public int getPort()
IClientCfg
getPort
in interface IClientCfg
public String getCharset()
IClientCfg
getCharset
in interface IClientCfg
public int getBufferSize()
IClientCfg
getBufferSize
in interface IClientCfg
public int getExecutorCount()
IClientCfg
getExecutorCount
in interface IClientCfg
public int getConnectionTimeout()
IClientCfg
getConnectionTimeout
in interface IClientCfg
public int getReconnectionInterval()
IClientCfg
getReconnectionInterval
in interface IClientCfg
public int getHeartbeatInterval()
IClientCfg
getHeartbeatInterval
in interface IClientCfg
public Map<String,String> getParams()
IClientCfg
getParams
in interface IClientCfg
public String getParam(String key)
IClientCfg
getParam
in interface IClientCfg
key
- 参数名称public String getParam(String key, String defaultValue)
IClientCfg
getParam
in interface IClientCfg
key
- 参数名称defaultValue
- 默认值Copyright © 2022. All rights reserved.