public static class BinaryServer.BinaryServerBuilder extends Object
| 构造器和说明 |
|---|
BinaryServerBuilder() |
public BinaryServer build() throws Exception
Exceptionpublic BinaryServer.BinaryServerBuilder decoder(AbstractBinaryDecoder decoder)
decoder - public BinaryServer.BinaryServerBuilder encoder(AbstractBinaryEncoder encoder)
encoder - public BinaryServer.BinaryServerBuilder serverName(String serverName)
serverName - public BinaryServer.BinaryServerBuilder addressPair(AddressPair addressPair)
port - public BinaryServer.BinaryServerBuilder factory(MessageFactory factory)
factory - public BinaryServer.BinaryServerBuilder connectionValidateTimeInSec(int connectionValidateTimeInSec)
connectionValidateTimeInSec - public BinaryServer.BinaryServerBuilder whiteList(String... remoteAddress)
remoteAddress - public BinaryServer.BinaryServerBuilder onChannelStateChanged(Proc2<io.netty.channel.Channel,Boolean> onChannelStateChanged)
onChannelStateChanged - public BinaryServer.BinaryServerBuilder onExceptionCaught(Proc2<io.netty.channel.Channel,Throwable> onExceptionCaught)
onExceptionCaught - public BinaryServer.BinaryServerBuilder onServerBind(Proc1<io.netty.channel.Channel> onServerBind)
onServerBind - public BinaryServer.BinaryServerBuilder onConnectionEffective(Proc1<io.netty.channel.Channel> onConnectionEffective)
onConnectionEffective - public BinaryServer.BinaryServerBuilder dispatchMessage(Proc2<Message,IHandler<Message>> dispatchMessage)
dispatchMessage - public BinaryServer.BinaryServerBuilder maxConnection(int maxConnection)
maxConnection - public BinaryServer.BinaryServerBuilder heartIntervalSec(int heartIntervalSec)
heartIntervalSec - public BinaryServer.BinaryServerBuilder checkHeartWhenConnectionCount(int checkHeartWhenConnectionCount)
checkHeartWhenConnectionCount - public BinaryServer.BinaryServerBuilder receiveIntervalMills(int receiveIntervalMills)
receiveIntervalMills - Copyright © 2017. All rights reserved.