public abstract class ReliableClient
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.bootstrap.Bootstrap |
bootstrap |
protected io.netty.channel.ChannelFuture |
channelFuture |
protected io.netty.channel.ChannelInitializer<io.netty.channel.Channel> |
channelInitializer |
| Constructor and Description |
|---|
ReliableClient(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connected channel future.
|
protected abstract void |
configureBootstrap()
Configure the bootstrap channel, event group and options.
|
void |
connect(java.net.SocketAddress address,
boolean sync)
Connect to the given address.
|
void |
connect(java.lang.String ip,
int port,
boolean sync)
Connect to the given host and port.
|
io.netty.bootstrap.Bootstrap |
getBootstrap() |
io.netty.channel.ChannelFuture |
getChannelFuture() |
protected final io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer
protected final io.netty.bootstrap.Bootstrap bootstrap
protected io.netty.channel.ChannelFuture channelFuture
public ReliableClient(io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer)
protected abstract void configureBootstrap()
public void connect(java.lang.String ip,
int port,
boolean sync)
ip - The ip to connect toport - The port to connect tosync - If the method should wait for the connect to completepublic void connect(java.net.SocketAddress address,
boolean sync)
address - The address to connect tosync - If the method should wait for the connect to completepublic io.netty.bootstrap.Bootstrap getBootstrap()
public io.netty.channel.ChannelFuture getChannelFuture()
public void close()