public abstract class AbstractConnectionFactory extends Object implements ConnectionFactory
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.bootstrap.Bootstrap |
bootstrap |
| Constructor and Description |
|---|
AbstractConnectionFactory(Codec codec,
io.netty.channel.ChannelHandler heartbeatHandler,
io.netty.channel.ChannelHandler handler,
Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
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, Configuration configuration)
public void init(ConnectionEventHandler connectionEventHandler)
ConnectionFactoryinit in interface ConnectionFactorypublic Connection createConnection(Url url) throws Exception
ConnectionFactorycreateConnection in interface ConnectionFactoryurl - target urlExceptionpublic Connection createConnection(String targetIP, int targetPort, int connectTimeout) throws Exception
ConnectionFactorycreateConnection in interface ConnectionFactorytargetIP - target iptargetPort - target portconnectTimeout - connect timeout in millisecondExceptionpublic Connection createConnection(String targetIP, int targetPort, byte version, int connectTimeout) throws Exception
ConnectionFactorycreateConnection in interface ConnectionFactorytargetIP - target iptargetPort - target portversion - protocol versionconnectTimeout - connect timeout in millisecondExceptionCopyright © 2024. All rights reserved.