public class ChannelCreator extends Object
Reservation.WaitReservationPermanent
and should never be called directly. With this class one can create TCP or
UDP channels up to a certain extend. Thus it must be know beforehand how many
connections will be created.| Modifier and Type | Method and Description |
|---|---|
int |
availableTCPPermits() |
int |
availableUDPPermits() |
io.netty.channel.ChannelFuture |
createTCP(SocketAddress socketAddress,
int connectionTimeoutMillis,
Map<String,Pair<io.netty.util.concurrent.EventExecutorGroup,io.netty.channel.ChannelHandler>> channelHandlers,
FutureResponse futureResponse)
Creates a channel to the given address.
|
io.netty.channel.ChannelFuture |
createUDP(boolean broadcast,
Map<String,Pair<io.netty.util.concurrent.EventExecutorGroup,io.netty.channel.ChannelHandler>> channelHandlers,
FutureResponse futureResponse)
Creates a "channel" to the given address.
|
boolean |
isShutdown() |
io.netty.channel.ChannelFuture |
setupCloseListener(io.netty.channel.ChannelFuture channelFuture,
FutureResponse futureResponse)
Setup the close listener for a channel that was already created
|
FutureDone<Void> |
shutdown()
Shutdown this channel creator.
|
FutureDone<Void> |
shutdownFuture() |
String |
toString() |
public io.netty.channel.ChannelFuture createUDP(boolean broadcast,
Map<String,Pair<io.netty.util.concurrent.EventExecutorGroup,io.netty.channel.ChannelHandler>> channelHandlers,
FutureResponse futureResponse)
broadcast - Sets this channel to be able to broadcastchannelHandlers - The handlers to setfutureResponse - The futureResponsepublic io.netty.channel.ChannelFuture createTCP(SocketAddress socketAddress, int connectionTimeoutMillis, Map<String,Pair<io.netty.util.concurrent.EventExecutorGroup,io.netty.channel.ChannelHandler>> channelHandlers, FutureResponse futureResponse)
socketAddress - The address to send future messagesconnectionTimeoutMillis - The timeout for establishing a TCP connectionchannelHandlers - The handlers to setfutureResponse - the futureResponsepublic io.netty.channel.ChannelFuture setupCloseListener(io.netty.channel.ChannelFuture channelFuture,
FutureResponse futureResponse)
channelFuture - The channel futurefutureResponse - The future responsepublic boolean isShutdown()
public FutureDone<Void> shutdown()
public FutureDone<Void> shutdownFuture()
shutdown()public int availableUDPPermits()
public int availableTCPPermits()
Copyright © 2014. All rights reserved.