public static class BinaryClient.BinaryClientBuilder extends Object
| 构造器和说明 |
|---|
BinaryClientBuilder() |
| 限定符和类型 | 方法和说明 |
|---|---|
BinaryClient.BinaryClientBuilder |
autoReconnect(int autoReconnect)
自动重连尝试间隔(秒)
|
BinaryClient |
build()
构建配置
|
BinaryClient.BinaryClientBuilder |
clientName(String clientName) |
BinaryClient.BinaryClientBuilder |
decoder(AbstractBinaryDecoder decoder) |
BinaryClient.BinaryClientBuilder |
dispatchMessage(Proc2<Message,IHandler<Message>> dispatchMessage) |
BinaryClient.BinaryClientBuilder |
encoder(AbstractBinaryEncoder encoder) |
BinaryClient.BinaryClientBuilder |
factory(MessageFactory factory) |
BinaryClient.BinaryClientBuilder |
heartIntervalSec(int heartIntervalSec) |
BinaryClient.BinaryClientBuilder |
onChannelStateChanged(Proc2<BinaryClient,Boolean> onChannelStateChanged) |
BinaryClient.BinaryClientBuilder |
onConnectionEffective(Proc1<BinaryClient> onConnectionEffective) |
BinaryClient.BinaryClientBuilder |
onExceptionCaught(Proc2<BinaryClient,Throwable> onExceptionCaught) |
BinaryClient.BinaryClientBuilder |
remoteAddress(AddressPair remoteAddress)
服务器IP
|
public BinaryClient build() throws Exception
Exceptionpublic BinaryClient.BinaryClientBuilder decoder(AbstractBinaryDecoder decoder)
public BinaryClient.BinaryClientBuilder encoder(AbstractBinaryEncoder encoder)
public BinaryClient.BinaryClientBuilder clientName(String clientName)
public BinaryClient.BinaryClientBuilder remoteAddress(AddressPair remoteAddress)
remoteIp - public BinaryClient.BinaryClientBuilder autoReconnect(int autoReconnect)
autoReconnect - public BinaryClient.BinaryClientBuilder factory(MessageFactory factory)
public BinaryClient.BinaryClientBuilder onChannelStateChanged(Proc2<BinaryClient,Boolean> onChannelStateChanged)
public BinaryClient.BinaryClientBuilder onExceptionCaught(Proc2<BinaryClient,Throwable> onExceptionCaught)
public BinaryClient.BinaryClientBuilder onConnectionEffective(Proc1<BinaryClient> onConnectionEffective)
public BinaryClient.BinaryClientBuilder dispatchMessage(Proc2<Message,IHandler<Message>> dispatchMessage)
public BinaryClient.BinaryClientBuilder heartIntervalSec(int heartIntervalSec)
Copyright © 2017. All rights reserved.