LimeWire Consolidated API

com.limegroup.gnutella
Interface UploadManager

All Superinterfaces:
BandwidthTracker
All Known Implementing Classes:
HTTPUploadManager

public interface UploadManager
extends BandwidthTracker

Defines the requirements for classes that manage Gnutella uploads.


Method Summary
 float getLastMeasuredBandwidth()
          Return the last value that was measured by BandwidthTracker.getMeasuredBandwidth().
 int getNumQueuedUploads()
          Returns the number of queued uploads.
 boolean hadSuccesfulUpload()
          Returns true if this has ever successfully uploaded a file during this session.
 boolean isConnectedTo(InetAddress addr)
          Returns true if any uploader is conneected to addr.
 boolean isServiceable()
          Returns whether or not an upload request can be serviced immediately.
 boolean killUploadsForFileDesc(FileDesc fd)
          Stops all uploads that are uploading fd.
 boolean mayBeServiceable()
          Returns if an incoming query (not actual upload request) may be serviceable.
 int measuredUploadSpeed()
          Returns the estimated upload speed in KILOBITS/s [sic] of the next transfer, assuming the client (i.e., downloader) has infinite
 void start()
          Registers HttpRequestHandlers with acceptor.
 void stop()
          Deregisters HttpRequestHandlers with acceptor.
 int uploadsInProgress()
          Returns the number of uploads excluding forced uploads.
 
Methods inherited from interface com.limegroup.gnutella.BandwidthTracker
getAverageBandwidth, getMeasuredBandwidth, measureBandwidth
 

Method Detail

getLastMeasuredBandwidth

float getLastMeasuredBandwidth()
Return the last value that was measured by BandwidthTracker.getMeasuredBandwidth().

Returns:
bandwidth in KB / s

getNumQueuedUploads

int getNumQueuedUploads()
Returns the number of queued uploads.


uploadsInProgress

int uploadsInProgress()
Returns the number of uploads excluding forced uploads.


hadSuccesfulUpload

boolean hadSuccesfulUpload()
Returns true if this has ever successfully uploaded a file during this session.

This method was added to adopt more of the BearShare QHD standard.


isConnectedTo

boolean isConnectedTo(InetAddress addr)
Returns true if any uploader is conneected to addr.


isServiceable

boolean isServiceable()
Returns whether or not an upload request can be serviced immediately. In particular, if there are more available upload slots than queued uploads this will return true.


killUploadsForFileDesc

boolean killUploadsForFileDesc(FileDesc fd)
Stops all uploads that are uploading fd.


mayBeServiceable

boolean mayBeServiceable()
Returns if an incoming query (not actual upload request) may be serviceable.


measuredUploadSpeed

int measuredUploadSpeed()
Returns the estimated upload speed in KILOBITS/s [sic] of the next transfer, assuming the client (i.e., downloader) has infinite


start

void start()
Registers HttpRequestHandlers with acceptor.


stop

void stop()
Deregisters HttpRequestHandlers with acceptor.


LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.