|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.client.streaming.ConnectionManager
public class ConnectionManager
Coordinate all of the connections for a single local destination.
Nested Class Summary | |
---|---|
(package private) static interface |
ConnectionManager.PingNotifier
|
Constructor Summary | |
---|---|
ConnectionManager(I2PAppContext context,
I2PSession session,
int maxConcurrent,
ConnectionOptions defaultOptions)
|
Method Summary | |
---|---|
Connection |
connect(Destination peer,
ConnectionOptions opts)
Build a new connection to the given peer. |
void |
disconnectAllHard()
Something b0rked hard, so kill all of our connections without mercy. |
boolean |
getAllowIncomingConnections()
should we acceot connections, or just reject everyone? |
(package private) Connection |
getConnectionByInboundId(long id)
|
(package private) Connection |
getConnectionByOutboundId(long id)
not guaranteed to be unique, but in case we receive more than one packet on an inbound connection that we havent ack'ed yet... |
ConnectionHandler |
getConnectionHandler()
|
MessageHandler |
getMessageHandler()
|
PacketHandler |
getPacketHandler()
|
PacketQueue |
getPacketQueue()
|
I2PSession |
getSession()
|
java.util.Set |
listConnections()
return a set of Connection objects |
boolean |
ping(Destination peer,
long timeoutMs)
|
boolean |
ping(Destination peer,
long timeoutMs,
boolean blocking)
|
boolean |
ping(Destination peer,
long timeoutMs,
boolean blocking,
SessionKey keyToUse,
java.util.Set tagsToSend,
ConnectionManager.PingNotifier notifier)
|
Connection |
receiveConnection(Packet synPacket)
Create a new connection based on the SYN packet we received. |
(package private) void |
receivePong(long pingId)
|
void |
removeConnection(Connection con)
Drop the (already closed) connection on the floor. |
void |
setAllowIncomingConnections(boolean allow)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionManager(I2PAppContext context, I2PSession session, int maxConcurrent, ConnectionOptions defaultOptions)
Method Detail |
---|
Connection getConnectionByInboundId(long id)
Connection getConnectionByOutboundId(long id)
public void setAllowIncomingConnections(boolean allow)
public boolean getAllowIncomingConnections()
public Connection receiveConnection(Packet synPacket)
public Connection connect(Destination peer, ConnectionOptions opts)
public MessageHandler getMessageHandler()
public PacketHandler getPacketHandler()
public ConnectionHandler getConnectionHandler()
public I2PSession getSession()
public PacketQueue getPacketQueue()
public void disconnectAllHard()
public void removeConnection(Connection con)
public java.util.Set listConnections()
public boolean ping(Destination peer, long timeoutMs)
public boolean ping(Destination peer, long timeoutMs, boolean blocking)
public boolean ping(Destination peer, long timeoutMs, boolean blocking, SessionKey keyToUse, java.util.Set tagsToSend, ConnectionManager.PingNotifier notifier)
void receivePong(long pingId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |