de.esprit.netsuite.netdata.agent.internal.transfer

## Class AbstractDownloadTask<C extends ClientContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.task.AbstractAsyncExecutable<C>
      - - de.esprit.appsuite.task.AbstractAsyncTask<C>
        - - de.esprit.netsuite.rtask.AbstractClientTask<C>
          - - de.esprit.netsuite.netdata.agent.internal.transfer.AbstractDownloadTask<C>

- All Implemented Interfaces:
    ApplicationObject<C>, AsyncExecutable<C>, AsyncTask<C>, CancellableTask, LocalCancellableTask, TaskMonitorSupport, TaskIdHolder, SimpleLogSupport, Dumpable, Executable, ClientObject<C>, java.lang.Runnable
  Direct Known Subclasses:
    AbstractAsciiDownloadTask, AbstractBinaryDownloadTask

      public abstract class AbstractDownloadTask<C extends ClientContext>
      extends AbstractClientTask<C>

  This class ...
  Author:
    Rainer Buesch

- - ### Field Summary

    - ### Fields inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `childTaskRef, isTestMode, monitorController, resultRef, stateFlag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractDownloadTask(C ctx, DownloadStream stream)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doOnFinish()` Is called in ANY CASE when the task has finished.
    `protected void` | `doOnStart()` Is called when the task actually has started.
    `protected abstract FileDataType` | `getDataType()`
    `java.io.File` | `getServerFile()`
    `protected DownloadStream` | `getStream()`

    - ### Methods inherited from class de.esprit.netsuite.rtask.AbstractClientTask

      `executeSubTask, getClientContext, getSessionId`

    - ### Methods inherited from class de.esprit.appsuite.task.AbstractAsyncTask

      `awaitFinished, awaitFinished, awaitStarted, cancel, createTaskId, deregisterTask, doOnSuccess, executeAsync, executeChildTask, executeChildTask, getCurrentFuture, getMaxChildTasks, getPriority, getProcessingDuration, getStartTime, getStopWatch, handleFinish, handleStart, handleSuccess, isRegisterForCancel, isRunning, notifyProceeded, registerTask, releaseStart, run, setCurrentFuture, setMaxChildTasks, setPriority, setRegisterForCancel, setReleaseTimeout, submit, submit, submitInternal, toString, wasSucceeded`

    - ### Methods inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `addMonitor, checkCancelled, checkForErrorAndRethrow, clearMonitors, createRunStateFlag, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, hasError, hasMonitor, isCancellable, registerTaskStateChange, removeMonitor, resetProgress, setCancellable, setLogLevel, setMaxProgressSteps, setMonitor, setName, setName, setResult, setRunStateFlag, setTaskId, setType, shouldFireMonitor, sleepChecked, wasCancelled`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface de.esprit.appsuite.task.AsyncTask

      `getError, hasError, setName`

    - ### Methods inherited from interface de.esprit.appsuite.task.AsyncExecutable

      `checkCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, setCancellable, setName, setResult, setRunStateFlag, sleepChecked`

    - ### Methods inherited from interface de.esprit.appsuite.launch.ApplicationObject

      `getApplicationContext`

    - ### Methods inherited from interface de.esprit.common.type.Executable

      `execute`

    - ### Methods inherited from interface de.esprit.appsuite.task.monitor.TaskMonitorSupport

      `addMonitor, clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitor`

    - ### Methods inherited from interface de.esprit.common.log.SimpleLogSupport

      `getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from interface de.esprit.appsuite.task.CancellableTask

      `wasCancelled`

    - ### Methods inherited from interface de.esprit.appsuite.task.TaskIdHolder

      `getTaskId`

    - ### Methods inherited from interface de.esprit.common.type.Dumpable

      `toDumpString, toDumpString, toString`

- - ### Constructor Detail

    - #### AbstractDownloadTask

          public AbstractDownloadTask(C ctx,
                              DownloadStream stream)

  - ### Method Detail

    - #### getServerFile

          public java.io.File getServerFile()

    - #### getStream

          protected DownloadStream getStream()

    - #### getDataType

          protected abstract FileDataType getDataType()

    - #### doOnStart

          protected void doOnStart()
                            throws java.lang.Exception

      Description copied from class: `AbstractAsyncTask`
      Is called when the task actually has started. Maybe overridden to perform any task preparation. Note that an Exception thrown here will cause the task to fail.
      Overrides:
        `doOnStart` in class `AbstractAsyncTask<C extends ClientContext>`
      Throws:
        `java.lang.Exception`

    - #### doOnFinish

          protected void doOnFinish()

      Description copied from class: `AbstractAsyncTask`
      Is called in ANY CASE when the task has finished. Maybe overridden to perform any task finalization. Note that any Exceptions thrown are caught and just logged but do NOT affect the task.
      Overrides:
        `doOnFinish` in class `AbstractAsyncTask<C extends ClientContext>`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.