public abstract class AbstractConnectionFactory extends Object implements ConnectionFactory
| 限定符和类型 | 字段和说明 |
|---|---|
protected io.netty.bootstrap.Bootstrap |
bootstrap |
| 构造器和说明 |
|---|
AbstractConnectionFactory(Codec codec,
io.netty.channel.ChannelHandler heartbeatHandler,
io.netty.channel.ChannelHandler handler,
ConfigurableInstance confInstance) |
| 限定符和类型 | 方法和说明 |
|---|---|
Connection |
createConnection(String targetIP,
int targetPort,
byte version,
int connectTimeout)
Create a connection according to the IP and port.
|
Connection |
createConnection(String targetIP,
int targetPort,
int connectTimeout)
Create a connection according to the IP and port.
|
Connection |
createConnection(Url url)
Create a connection use #BoltUrl
|
protected io.netty.channel.Channel |
doCreateConnection(String targetIP,
int targetPort,
int connectTimeout) |
void |
init(ConnectionEventHandler connectionEventHandler)
Initialize the factory.
|
public AbstractConnectionFactory(Codec codec, io.netty.channel.ChannelHandler heartbeatHandler, io.netty.channel.ChannelHandler handler, ConfigurableInstance confInstance)
public void init(ConnectionEventHandler connectionEventHandler)
ConnectionFactoryinit 在接口中 ConnectionFactorypublic Connection createConnection(Url url) throws Exception
ConnectionFactorycreateConnection 在接口中 ConnectionFactoryurl - target urlExceptionpublic Connection createConnection(String targetIP, int targetPort, int connectTimeout) throws Exception
ConnectionFactorycreateConnection 在接口中 ConnectionFactorytargetIP - target iptargetPort - target portconnectTimeout - connect timeout in millisecondExceptionpublic Connection createConnection(String targetIP, int targetPort, byte version, int connectTimeout) throws Exception
ConnectionFactorycreateConnection 在接口中 ConnectionFactorytargetIP - target iptargetPort - target portversion - protocol versionconnectTimeout - connect timeout in millisecondExceptionCopyright © 2021. All rights reserved.