cz.vity.freerapid.plugins.webclient.interfaces
Interface PluginRunner

All Known Implementing Classes:
AbstractRunner

public interface PluginRunner

Interface that represents "worker" - main code of the plugin - for downloading file

Author:
Ladislav Vitasek

Method Summary
 void init(ShareDownloadService shareDownloadService, HttpFileDownloadTask downloadTask)
          Initialization of runner - this method is called as first before methods run() and runCheck()
 void run()
          Main "bussiness logic" of the plugin - process of file downloading from service If no exception is thrown, everything is being considered to be OK - file download state is set to COMPLETED automatically
 void runCheck()
          Main "bussiness logic" of the plugin - process of downloading If no exception is thrown, everything is being considered to be OK - file state is set to FileState.EXISTING_AND_CHECKED automatically
 

Method Detail

init

void init(ShareDownloadService shareDownloadService,
          HttpFileDownloadTask downloadTask)
          throws Exception
Initialization of runner - this method is called as first before methods run() and runCheck()

Parameters:
shareDownloadService - download service that is associated to this runner
downloadTask - file downloader
Throws:
Exception - if initialization failed

runCheck

void runCheck()
              throws Exception
Main "bussiness logic" of the plugin - process of downloading If no exception is thrown, everything is being considered to be OK - file state is set to FileState.EXISTING_AND_CHECKED automatically

Throws:
Exception
See Also:
DownloadState, FileState

run

void run()
         throws Exception
Main "bussiness logic" of the plugin - process of file downloading from service If no exception is thrown, everything is being considered to be OK - file download state is set to COMPLETED automatically

Throws:
Exception - if anything went wrong
See Also:
DownloadState, FileState