org.lastbamboo.common.download
Interface LaunchFileTracker

All Superinterfaces:
org.littleshoot.util.LongRangeListener
All Known Implementing Classes:
DownloadingFileLauncher, LaunchFileDispatcher, LaunchFileTrackerAdapter

public interface LaunchFileTracker
extends org.littleshoot.util.LongRangeListener

Tracker for the file to launch for immediate viewing.


Method Summary
 int getActiveWriteCalls()
          Accessor for the number of active writers.
 void onDownloadStopped()
          Called when a download is stopped.
 void onFailure()
          Called when a download fails for any reason.
 void onFileComplete()
          Called when the file download has completed.
 void waitForLaunchersToComplete()
          Waits until all active launcher have finished their writes, typically to the browser.
 void write(OutputStream os, boolean cancelOnStreamClose)
          Writes the file to the specified stream.
 
Methods inherited from interface org.littleshoot.util.LongRangeListener
onRangeComplete
 

Method Detail

write

void write(OutputStream os,
           boolean cancelOnStreamClose)
           throws IOException
Writes the file to the specified stream.

Parameters:
os - The stream to write to.
Throws:
IOException - If there's any read or write error writing to the stream.

onFileComplete

void onFileComplete()
Called when the file download has completed.


waitForLaunchersToComplete

void waitForLaunchersToComplete()
Waits until all active launcher have finished their writes, typically to the browser.


getActiveWriteCalls

int getActiveWriteCalls()
Accessor for the number of active writers.

Returns:
The number of active writers.

onFailure

void onFailure()
Called when a download fails for any reason.


onDownloadStopped

void onDownloadStopped()
Called when a download is stopped.



Copyright © 2013 LittleShoot. All Rights Reserved.