LimeWire Consolidated API

com.limegroup.gnutella
Interface NetworkManager

All Superinterfaces:
ListenerSupport<AddressEvent>, Service, TLSManager
All Known Implementing Classes:
NetworkManagerImpl

public interface NetworkManager
extends Service, ListenerSupport<AddressEvent>, TLSManager


Method Summary
 boolean acceptedIncomingConnection()
          Returns true if this has accepted an incoming connection, and hence probably isn't firewalled.
 boolean addressChanged()
          Notifies components that this' IP address has changed.
 boolean canDoFWT()
           
 boolean canReceiveSolicited()
           
 boolean canReceiveUnsolicited()
           
 void externalAddressChanged()
          used to notify the NetworkManager of a change in the external IP.
 byte[] getAddress()
          Returns the raw IP address for this host.
 byte[] getExternalAddress()
          Returns the external IP address for this host.
 byte[] getNonForcedAddress()
          Returns the Non-Forced IP address for this host.
 int getNonForcedPort()
          Returns the Non-Forced port for this host.
 int getPort()
          Returns the port used for downloads and messaging connections.
 Connectable getPublicAddress()
          Returns the external, public address of this peer.
 GUID getSolicitedGUID()
           
 int getStableUDPPort()
           
 GUID getUDPConnectBackGUID()
           
 boolean incomingStatusChanged()
          Notification that we've either just set or unset acceptedIncoming.
 boolean isGUESSCapable()
          Returns whether or not this node is capable of sending its own GUESS queries.
 boolean isIpPortValid()
           
 boolean isOOBCapable()
          Returns whether or not this node is capable of performing OOB queries.
 void newPushProxies(Set<Connectable> pushProxies)
          used to notify the NetworkManager of a new MediatorAddress (i.e., push proxy)
 void portChanged()
          used to notify the NetworkManager of a change in the port.
 void setListeningPort(int port)
          Sets the port on which to listen for incoming connections.
 int supportsFWTVersion()
           
 
Methods inherited from interface org.limewire.lifecycle.Service
getServiceName, initialize, start, stop
 
Methods inherited from interface org.limewire.listener.ListenerSupport
addListener, removeListener
 
Methods inherited from interface org.limewire.net.TLSManager
isIncomingTLSEnabled, isOutgoingTLSEnabled, isTLSSupported, setIncomingTLSEnabled, setOutgoingTLSEnabled
 

Method Detail

isIpPortValid

boolean isIpPortValid()
Returns:
true if your IP and port information is valid.

getUDPConnectBackGUID

GUID getUDPConnectBackGUID()

isOOBCapable

boolean isOOBCapable()
Returns whether or not this node is capable of performing OOB queries.


isGUESSCapable

boolean isGUESSCapable()
Returns whether or not this node is capable of sending its own GUESS queries. This would not be the case only if this node has not successfully received an incoming UDP packet.

Returns:
true if this node is capable of running its own GUESS queries, false otherwise

getNonForcedPort

int getNonForcedPort()
Returns the Non-Forced port for this host.

Returns:
the non-forced port for this host

getPort

int getPort()
Returns the port used for downloads and messaging connections. Used to fill out the My-Address header in ManagedConnection.

See Also:
Acceptor.getPort(boolean)

getNonForcedAddress

byte[] getNonForcedAddress()
Returns the Non-Forced IP address for this host.

Returns:
the non-forced IP address for this host

getAddress

byte[] getAddress()
Returns the raw IP address for this host.

Returns:
the raw IP address for this host

getExternalAddress

byte[] getExternalAddress()
Returns the external IP address for this host.


incomingStatusChanged

boolean incomingStatusChanged()
Notification that we've either just set or unset acceptedIncoming.


addressChanged

boolean addressChanged()
Notifies components that this' IP address has changed.


externalAddressChanged

void externalAddressChanged()
used to notify the NetworkManager of a change in the external IP.


portChanged

void portChanged()
used to notify the NetworkManager of a change in the port.


newPushProxies

void newPushProxies(Set<Connectable> pushProxies)
used to notify the NetworkManager of a new MediatorAddress (i.e., push proxy)


acceptedIncomingConnection

boolean acceptedIncomingConnection()
Returns true if this has accepted an incoming connection, and hence probably isn't firewalled. (This is useful for colorizing search results in the GUI.)


setListeningPort

void setListeningPort(int port)
                      throws IOException
Sets the port on which to listen for incoming connections. If that fails, this is not modified and IOException is thrown. If port==0, tells this to stop listening to incoming connections.

Throws:
IOException

canReceiveUnsolicited

boolean canReceiveUnsolicited()

canReceiveSolicited

boolean canReceiveSolicited()

canDoFWT

boolean canDoFWT()

getStableUDPPort

int getStableUDPPort()

getSolicitedGUID

GUID getSolicitedGUID()

supportsFWTVersion

int supportsFWTVersion()

getPublicAddress

Connectable getPublicAddress()
Returns the external, public address of this peer. Will return an invalid address if no address is known yet.

Will return the external address whether the peer is firewalled or not.


LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.