public class NamiBuilder
extends java.lang.Object
限定符 | 构造器和说明 |
---|---|
protected |
NamiBuilder() |
protected |
NamiBuilder(Config config) |
限定符和类型 | 方法和说明 |
---|---|
Nami |
build() |
NamiBuilder |
channel(Channel channel)
设置反序列器
|
<T> T |
create(java.lang.Class<?> clz)
创建接口代理
|
java.lang.Object |
create(java.lang.Class<?> clz,
NamiClient client)
创建接口代理
|
NamiBuilder |
decoder(Decoder decoder)
设置反序列器
|
NamiBuilder |
encoder(Encoder encoder)
设置序列化器
|
NamiBuilder |
filterAdd(Filter filter)
添加拦截器
|
NamiBuilder |
group(java.lang.String group)
设置服务分组
|
NamiBuilder |
headerSet(java.lang.String name,
java.lang.String val)
设置头
|
NamiBuilder |
heartbeat(int heartbeat) |
NamiBuilder |
name(java.lang.String name)
设置服务名字
|
NamiBuilder |
path(java.lang.String path)
设置服务路径
|
NamiBuilder |
timeout(int timeout) |
java.util.function.Supplier<java.lang.String> |
upstream()
获取负载代理
|
NamiBuilder |
upstream(java.util.function.Supplier<java.lang.String> upstream)
设置负载代理
|
NamiBuilder |
url(java.lang.String url)
设置服务端地址
|
protected NamiBuilder()
protected NamiBuilder(Config config)
public NamiBuilder timeout(int timeout)
timeout
- 超时(单位:秒)public NamiBuilder heartbeat(int heartbeat)
heartbeat
- 心跳(单为:秒)public NamiBuilder encoder(Encoder encoder)
public NamiBuilder decoder(Decoder decoder)
public NamiBuilder channel(Channel channel)
public NamiBuilder upstream(java.util.function.Supplier<java.lang.String> upstream)
public java.util.function.Supplier<java.lang.String> upstream()
public NamiBuilder url(java.lang.String url)
public NamiBuilder name(java.lang.String name)
public NamiBuilder path(java.lang.String path)
public NamiBuilder group(java.lang.String group)
public NamiBuilder filterAdd(Filter filter)
public NamiBuilder headerSet(java.lang.String name, java.lang.String val)
public Nami build()
public <T> T create(java.lang.Class<?> clz)
public java.lang.Object create(java.lang.Class<?> clz, NamiClient client)