org.xnap.plugin.joscar
Class JOscarPeer

java.lang.Object
  extended by org.xnap.peer.AbstractPeer
      extended by org.xnap.plugin.joscar.JOscarPeer
All Implemented Interfaces:
java.util.EventListener, StateListener, HotlistItem, Peer

public class JOscarPeer
extends AbstractPeer
implements HotlistItem, StateListener


Constructor Summary
JOscarPeer(java.lang.String uin)
           
 
Method Summary
 void addStateListener(StateListener listener)
          Adds a state listener.
 javax.swing.Action[] getActions()
          Returns the actions that can performed by the item.
 java.lang.String getCategory()
          Returns the category of the item.
 java.lang.String getComment()
          Returns the user defined comment of the item.
 java.lang.String getHost()
          Returns the ip address or hostname of this peer.
 javax.swing.Icon getIcon()
          Returns a 16x16 icon.
 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 getStatus()
          Returns the status of the peers represented by this item.
 void removeStateListener(StateListener listener)
          Remove a state listener.
 void setStatus(java.lang.String newStatus)
           
 void stateChanged(StateEvent e)
          Invoked when the object has changed.
 
Methods inherited from class org.xnap.peer.AbstractPeer
getClientInfo, getFileCount, getLinkSpeed, getName, setClientInfo, setFileCount, setLinkSpeed, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xnap.peer.HotlistItem
getName
 

Constructor Detail

JOscarPeer

public JOscarPeer(java.lang.String uin)
Method Detail

stateChanged

public void stateChanged(StateEvent e)
Description copied from interface: StateListener
Invoked when the object has changed. Usually if the object is represented on screen the gui needs to be updated.

Specified by:
stateChanged in interface StateListener

addStateListener

public void addStateListener(StateListener listener)
Description copied from interface: HotlistItem
Adds a state listener.

Specified by:
addStateListener in interface HotlistItem

getActions

public javax.swing.Action[] getActions()
Description copied from interface: HotlistItem
Returns the actions that can performed by the item.

Specified by:
getActions in interface HotlistItem
Specified by:
getActions in interface Peer

getCategory

public java.lang.String getCategory()
Description copied from interface: HotlistItem
Returns the category of the item.

Specified by:
getCategory in interface HotlistItem

getComment

public java.lang.String getComment()
Description copied from interface: HotlistItem
Returns the user defined comment of the item.

Specified by:
getComment in interface HotlistItem

getIcon

public javax.swing.Icon getIcon()
Description copied from interface: HotlistItem
Returns a 16x16 icon. The icon is displayed next to the name.

Specified by:
getIcon in interface HotlistItem

getStatus

public java.lang.String getStatus()
Description copied from interface: HotlistItem
Returns the status of the peers represented by this item. See the getStatus() method.

Specified by:
getStatus in interface HotlistItem
Specified by:
getStatus in interface Peer
See Also:
xnap.peer.HotlistItem#getStatus()

setStatus

public void setStatus(java.lang.String newStatus)

removeStateListener

public void removeStateListener(StateListener listener)
Description copied from interface: HotlistItem
Remove a state listener.

Specified by:
removeStateListener in interface HotlistItem

getHost

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

Specified by:
getHost in interface Peer

getLocalDownloadCount

public int getLocalDownloadCount()
Description copied from interface: Peer
Returns the number of currently running downloads from this peer.

Specified by:
getLocalDownloadCount in interface Peer

getLocalUploadCount

public int getLocalUploadCount()
Description copied from interface: Peer
Returns the number of currently running uploads to this peer.

Specified by:
getLocalUploadCount in interface Peer


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