|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.tomp2p.connection.ConnectionHandler
public class ConnectionHandler
Handles the server connections of a node, i.e. the connections a node is listening on.
| Field Summary | |
|---|---|
static String |
THREAD_NAME
|
static int |
UDP_LIMIT
|
| Constructor Summary | |
|---|---|
ConnectionHandler(ConnectionHandler parent,
Number160 id,
KeyPair keyPair,
PeerMap peerMap)
Attaches a peer to an existing connection and use existing information |
|
ConnectionHandler(int udpPort,
int tcpPort,
Number160 id,
Bindings bindings,
int p2pID,
ConnectionConfiguration configuration,
File messageLogger,
KeyPair keyPair,
PeerMap peerMap,
List<PeerListener> listeners)
|
|
| Method Summary | |
|---|---|
void |
customLoggerMessage(String customMessage)
|
ConnectionBean |
getConnectionBean()
|
PeerBean |
getPeerBean()
Returns the node information bean of this node |
boolean |
isListening()
|
void |
mapUPNP()
|
void |
mapUPNP(InetAddress oldAddress,
InetAddress newAddress,
int portUDP,
int portTCP)
|
void |
shutdown()
Shuts down the dispatcher and frees resources Note: does not close any channels, use shutdownSharedTCP or
shutdownSharedUDP instead. |
boolean |
startupTCP(InetSocketAddress listenAddressesTCP,
DispatcherRequest dispatcher,
int maxMessageSize)
Creates TCP channels and listens on them |
boolean |
startupUDP(InetSocketAddress listenAddressesUDP,
DispatcherRequest dispatcher)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UDP_LIMIT
public static final String THREAD_NAME
| Constructor Detail |
|---|
public ConnectionHandler(int udpPort,
int tcpPort,
Number160 id,
Bindings bindings,
int p2pID,
ConnectionConfiguration configuration,
File messageLogger,
KeyPair keyPair,
PeerMap peerMap,
List<PeerListener> listeners)
throws Exception
Exception
public ConnectionHandler(ConnectionHandler parent,
Number160 id,
KeyPair keyPair,
PeerMap peerMap)
parent - id - | Method Detail |
|---|
public ConnectionBean getConnectionBean()
public boolean startupUDP(InetSocketAddress listenAddressesUDP,
DispatcherRequest dispatcher)
throws Exception
Exception
public boolean startupTCP(InetSocketAddress listenAddressesTCP,
DispatcherRequest dispatcher,
int maxMessageSize)
throws Exception
listenAddressesTCP - the addresses which we will listen on
Exceptionpublic PeerBean getPeerBean()
public void customLoggerMessage(String customMessage)
public void shutdown()
shutdownSharedTCP or
shutdownSharedUDP instead.
InterruptedException
public void mapUPNP()
throws IOException,
net.sbbi.upnp.messages.UPNPResponseException
IOException
net.sbbi.upnp.messages.UPNPResponseException
public void mapUPNP(InetAddress oldAddress,
InetAddress newAddress,
int portUDP,
int portTCP)
throws IOException,
net.sbbi.upnp.messages.UPNPResponseException
IOException
net.sbbi.upnp.messages.UPNPResponseExceptionpublic boolean isListening()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||