|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.tomp2p.connection.PeerConnection
public class PeerConnection
This is a handle for permanent connections. With this class the permanent connection can be reused or closed. The is only 1 connection allowed for a given destination. It is important that before Peer.shutdown, all permanent connections are closed. Otherwise shutdown will block forever and will wait until the permanent connection is closed.
Constructor Summary | |
---|---|
PeerConnection(PeerAddress destination,
ConnectionReservation connectionReservation,
ChannelCreator channelCreator,
int idleTCPMillis)
|
Method Summary | |
---|---|
void |
aquireSingleConnection()
Acquire one connection. |
void |
close()
Closes and releases the connection from the reservation. |
ChannelCreator |
getChannelCreator()
|
PeerAddress |
getDestination()
|
int |
getIdleTCPMillis()
|
boolean |
isClosed()
|
void |
releaseSingleConnection()
Releases one connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PeerConnection(PeerAddress destination, ConnectionReservation connectionReservation, ChannelCreator channelCreator, int idleTCPMillis)
Method Detail |
---|
public void close()
public PeerAddress getDestination()
public ChannelCreator getChannelCreator()
public boolean isClosed()
public int getIdleTCPMillis()
public void aquireSingleConnection() throws InterruptedException
InterruptedException
public void releaseSingleConnection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |