|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.tomp2p.connection.ChannelCreator
public class ChannelCreator
Creates the channels. This class is created by ConnectionReservation
and should never be called directly.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 allowed
public 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |