LimeWire Consolidated API

org.limewire.swarm.impl
Class AbstractSwarmSource

java.lang.Object
  extended by org.limewire.swarm.impl.AbstractSwarmSource
All Implemented Interfaces:
SwarmSource
Direct Known Subclasses:
SwarmHttpSource

public abstract class AbstractSwarmSource
extends Object
implements SwarmSource


Constructor Summary
AbstractSwarmSource()
           
 
Method Summary
 void addListener(SwarmSourceListener listener)
          Adds listener to this swarmsource.
 void connected(SwarmSourceDownloader swarmSourceHandler)
          Fires connected event to registerd listeners.
 void connectFailed(SwarmSourceDownloader swarmSourceHandler)
          Fires connectFailed event to registerd listeners.
 void connectionClosed(SwarmSourceDownloader swarmSourceHandler)
          Fires connectionClosed event to registerd Listeners.
 void finished(SwarmSourceDownloader swarmSourceHandler)
          Fires finished event to registerd Listeners.
 boolean isFinished()
          Returns true if we are finished with this swarm source, i.e.
 void removeListener(SwarmSourceListener listener)
          Removes a listener from this swarmSource.
 void responseProcessed(SwarmSourceDownloader swarmSourceHandler, SwarmStatus status)
          Fires responseProcessed event to registerd Listeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.limewire.swarm.SwarmSource
equals, getAddress, getAvailableRanges, getPath, getType, hashCode
 

Constructor Detail

AbstractSwarmSource

public AbstractSwarmSource()
Method Detail

addListener

public void addListener(SwarmSourceListener listener)
Description copied from interface: SwarmSource
Adds listener to this swarmsource.

Specified by:
addListener in interface SwarmSource

removeListener

public void removeListener(SwarmSourceListener listener)
Description copied from interface: SwarmSource
Removes a listener from this swarmSource.

Specified by:
removeListener in interface SwarmSource

connected

public void connected(SwarmSourceDownloader swarmSourceHandler)
Description copied from interface: SwarmSource
Fires connected event to registerd listeners. Supposed to be called by the SwarmSourceDownloader when it is connected to the source.

Specified by:
connected in interface SwarmSource

connectFailed

public void connectFailed(SwarmSourceDownloader swarmSourceHandler)
Description copied from interface: SwarmSource
Fires connectFailed event to registerd listeners.

Specified by:
connectFailed in interface SwarmSource

connectionClosed

public void connectionClosed(SwarmSourceDownloader swarmSourceHandler)
Description copied from interface: SwarmSource
Fires connectionClosed event to registerd Listeners.

Specified by:
connectionClosed in interface SwarmSource

finished

public void finished(SwarmSourceDownloader swarmSourceHandler)
Description copied from interface: SwarmSource
Fires finished event to registerd Listeners.

Specified by:
finished in interface SwarmSource

responseProcessed

public void responseProcessed(SwarmSourceDownloader swarmSourceHandler,
                              SwarmStatus status)
Description copied from interface: SwarmSource
Fires responseProcessed event to registerd Listeners.

Specified by:
responseProcessed in interface SwarmSource

isFinished

public boolean isFinished()
Description copied from interface: SwarmSource
Returns true if we are finished with this swarm source, i.e. if all its available ranges have been downloaded.

Specified by:
isFinished in interface SwarmSource

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.