org.xnap.peer
Interface Peer

All Known Implementing Classes:
AbstractPeer, GiFTUser, JOscarPeer, JTellaServant, LimeWireServant, OpenNapUser, OvernetPeer, PircBotPeer

public interface Peer

Defines the requirements for a peer. Peers are participants of networks.


Method Summary
 javax.swing.Action[] getActions()
          Returns the actions that can performed by the peer.
 java.lang.String getClientInfo()
          Returns the client info.
 int getFileCount()
          Returns the number of shared files by this peer.
 java.lang.String getHost()
          Returns the ip address or hostname of this peer.
 int getLinkSpeed()
          Returns the link speed of the peer.
 int getLocalDownloadCount()
          Returns the number of currently running downloads from this peer.
 int getLocalUploadCount()
          Returns the number of currently running uploads to this peer.
 java.lang.String getName()
          Returns the name of the peer.
 java.lang.String getStatus()
          Returns the status of the peer.
 

Method Detail

getActions

javax.swing.Action[] getActions()
Returns the actions that can performed by the peer.


getClientInfo

java.lang.String getClientInfo()
Returns the client info. This is the name of the peer's software, e.g. "XNap 2.4"

Returns:
null, if the client info is unknown; the client info, otherwise

getFileCount

int getFileCount()
Returns the number of shared files by this peer.

Returns:
-1, if the file count is unknown; the count, otherwise

getHost

java.lang.String getHost()
Returns the ip address or hostname of this peer. The host can include the port separated by a colon like this: "localhost:6699".


getLinkSpeed

int getLinkSpeed()
Returns the link speed of the peer.

Returns:
-1, if the link speed is unknown; the speed in kb/s, otherwise

getLocalDownloadCount

int getLocalDownloadCount()
Returns the number of currently running downloads from this peer.


getLocalUploadCount

int getLocalUploadCount()
Returns the number of currently running uploads to this peer.


getName

java.lang.String getName()
Returns the name of the peer.


getStatus

java.lang.String getStatus()
Returns the status of the peer. This could be something like "online" or "away".



Copyright © 2001-2005 XNap Team. All Rights Reserved.