LimeWire Consolidated API

com.limegroup.gnutella.altlocs
Class AltLocManager

java.lang.Object
  extended by com.limegroup.gnutella.altlocs.AltLocManager
All Implemented Interfaces:
EventListener<FileListChangedEvent>

public class AltLocManager
extends Object
implements EventListener<FileListChangedEvent>


Constructor Summary
AltLocManager()
           
 
Method Summary
 boolean add(AlternateLocation al, Object source)
          adds a given altloc to the manager
 void addListener(URN sha1, AltLocListener listener)
           
 AlternateLocationCollection<DirectAltLoc> getDirect(URN sha1)
           
 int getNumLocs(URN sha1)
           
 AlternateLocationCollection<PushAltLoc> getPushFWT(URN sha1)
          Returns push alternate locations that support FWT.
 AlternateLocationCollection<PushAltLoc> getPushNoFWT(URN sha1)
          Returns push alternate locations that do not support FWT.
 void handleEvent(FileListChangedEvent evt)
          Listens for events from FileManager
 boolean hasAltlocs(URN sha1)
           
 void purge()
           
 boolean remove(AlternateLocation al, Object source)
          removes the given altloc (implementations may demote)
 void removeListener(URN sha1, AltLocListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AltLocManager

public AltLocManager()
Method Detail

add

public boolean add(AlternateLocation al,
                   Object source)
adds a given altloc to the manager

Returns:
whether the manager already knew about this altloc

remove

public boolean remove(AlternateLocation al,
                      Object source)
removes the given altloc (implementations may demote)


getDirect

public AlternateLocationCollection<DirectAltLoc> getDirect(URN sha1)
Parameters:
sha1 - the URN for which to get altlocs

getPushNoFWT

public AlternateLocationCollection<PushAltLoc> getPushNoFWT(URN sha1)
Returns push alternate locations that do not support FWT.

Parameters:
sha1 - the URN for which to get altlocs

getPushFWT

public AlternateLocationCollection<PushAltLoc> getPushFWT(URN sha1)
Returns push alternate locations that support FWT.

Parameters:
sha1 - the URN for which to get altlocs

purge

public void purge()

hasAltlocs

public boolean hasAltlocs(URN sha1)

getNumLocs

public int getNumLocs(URN sha1)

addListener

public void addListener(URN sha1,
                        AltLocListener listener)

removeListener

public void removeListener(URN sha1,
                           AltLocListener listener)

handleEvent

public void handleEvent(FileListChangedEvent evt)
Listens for events from FileManager

Specified by:
handleEvent in interface EventListener<FileListChangedEvent>

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.