public class ChannelCreator extends Object
ConnectionReservation
and should never be called directly.Modifier and Type | Method and Description |
---|---|
org.jboss.netty.channel.ChannelFuture |
close(PeerAddress destination)
Closes a permanent connection.
|
FutureChannel |
createTCPChannel(ReplyTimeoutHandler timeoutHandler,
RequestHandlerTCP<? extends BaseFuture> requestHandler,
int connectTimeoutMillis,
InetSocketAddress recipient)
Creates a TCP channel future.
|
FutureChannel |
createUDPChannel(ReplyTimeoutHandler timeoutHandler,
RequestHandlerUDP<? extends BaseFuture> requestHandler,
boolean broadcast)
Creates a UDP channel.
|
long |
getCreatorThread() |
int |
getCurrentPermits() |
String |
getName() |
int |
getPermits() |
boolean |
isKeepAliveAndReuse() |
void |
shutdown()
Shuts down this channelcreator.
|
public FutureChannel createUDPChannel(ReplyTimeoutHandler timeoutHandler, RequestHandlerUDP<? extends BaseFuture> requestHandler, boolean broadcast)
timeoutHandler
- The handler that deals with timeoutsrequestHandler
- The handler that deals with incoming repliesbroadcast
- Set to true if broadcast is allowedpublic FutureChannel createTCPChannel(ReplyTimeoutHandler timeoutHandler, RequestHandlerTCP<? extends BaseFuture> requestHandler, int connectTimeoutMillis, InetSocketAddress recipient)
timeoutHandler
- The handler that deals with timeoutsrequestHandler
- The handler that deals with incoming repliesconnectTimeoutMillis
- The timeout after which a connection attempt is considered a
failurerecipient
- The recipient to create the connection. If the recipient is
already open, the connection will be reused.public org.jboss.netty.channel.ChannelFuture close(PeerAddress destination)
destination
- The address of the destination peer of the permanent
connection.public int getPermits()
public int getCurrentPermits()
public void shutdown()
public String getName()
public long getCreatorThread()
public boolean isKeepAliveAndReuse()
Copyright © 2013. All Rights Reserved.