de.esprit.netsuite.client.workflow

## Class AbstractFileStreamWFT<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.appsuite.gui.task.AbstractSwingTask<C>
          - - de.esprit.appsuite.workflow.wft.AbstractWFT<C>
            - - de.esprit.netsuite.client.workflow.AbstractClientWFT<C>
              - - de.esprit.netsuite.client.workflow.AbstractFileStreamWFT<C>

- All Implemented Interfaces:
    ApplicationObject<C>, AsyncExecutable<C>, AsyncTask<C>, CancellableTask, LocalCancellableTask, TaskMonitorSupport, TaskEvent.Source, TaskIdHolder, WorkflowTask<C>, ErrorHandlerSupport, Renderable, SimpleLogSupport, Dumpable, Executable, ClientObject<C>, java.lang.Runnable
  Direct Known Subclasses:
    AbstractStreamParserWFT

      public abstract class AbstractFileStreamWFT<C extends ClientContext>
      extends AbstractClientWFT<C>

  This workflow task runs a `FileStreamDownloadAgent` with the `FileStreamJob` set.
  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
    `AbstractFileStreamWFT(AbstractWorkflow workflow)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doneTaskFinished(TaskEvent e)`
    `protected void` | `doneTaskProceeded(TaskEvent e)`
    `protected void` | `doOnFinish()` Is called in ANY CASE when the task has finished.
    `void` | `enterTask(WorkflowTask previousTask)` Runs in the ET before the task starts to run async
    `void` | `executeAsyncImpl()` This method is executed asynchronously
    `FileDataType` | `getFileDataType()`
    `FileStreamJob` | `getJob()`
    `JobId` | `getJobId()`
    `RemoteFileInfo` | `getRemoteFileInfo()`
    `protected void` | `readAsciiStream(DownloadReader reader)`
    `protected void` | `readBinaryStream(DownloadStream stream)`
    `void` | `setJob(FileStreamJob job)`
    `void` | `setTransferLocked(boolean isLocked)`
    `TaskId` | `submit(java.util.concurrent.ExecutorService pool)` Submits this task for execution to the given thread pool

    - ### Methods inherited from class de.esprit.netsuite.client.workflow.AbstractClientWFT

      `getClientConfig, getClientContext, getWorkspaceDir`

    - ### Methods inherited from class de.esprit.appsuite.workflow.wft.AbstractWFT

      `executeAsync, exitTask, getTaskIndex, getWorkflow, getWorkingDir, isDeciderTask, isTaskRepeating, setName, setTaskIndex, updateTaskName`

    - ### Methods inherited from class de.esprit.appsuite.gui.task.AbstractSwingTask

      `addMonitor, addTaskListener, awaitEventsDone, doneChildFinished, doneChildStarted, doneTaskCancelled, doneTaskFailed, doneTaskStarted, doneTaskStateChanged, doneTaskSucceeded, getActionCancel, getRenderColor, getRenderIcon, getRenderText, getSwingTaskMonitor, isRegisterInTaskList, removeTaskListener, showError, showError, showError, showInfo, showInfo, showWarning, showWarning`

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

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

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

      `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, 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

      `awaitFinished, awaitFinished, awaitStarted, executeChildTask, executeChildTask, getError, getProcessingDuration, hasError, isRegisterForCancel, isRunning, releaseStart, setName, setReleaseTimeout, submit`

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

      `checkCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, notifyProceeded, setCancellable, 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 java.lang.Runnable

      `run`

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

      `cancel`

    - ### 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, toString`

- - ### Constructor Detail

    - #### AbstractFileStreamWFT

          public AbstractFileStreamWFT(AbstractWorkflow workflow)

  - ### Method Detail

    - #### enterTask

          public void enterTask(WorkflowTask previousTask)
                         throws java.lang.Exception

      Description copied from interface: `WorkflowTask`
      Runs in the ET before the task starts to run async
      Specified by:
        `enterTask` in interface `WorkflowTask<C extends ClientContext>`
      Overrides:
        `enterTask` in class `AbstractWFT<C extends ClientContext>`
      Throws:
        `java.lang.Exception`

    - #### getRemoteFileInfo

          public RemoteFileInfo getRemoteFileInfo()

    - #### submit

          public TaskId submit(java.util.concurrent.ExecutorService pool)
                        throws java.lang.Exception

      Description copied from interface: `AsyncTask`
      Submits this task for execution to the given thread pool
      Specified by:
        `submit` in interface `AsyncTask<C extends ClientContext>`
      Overrides:
        `submit` in class `AbstractAsyncTask<C extends ClientContext>`
      Throws:
        `java.lang.Exception` - if the pool is busy

    - #### executeAsyncImpl

          public final void executeAsyncImpl()
                                      throws java.lang.Exception

      Description copied from interface: `WorkflowTask`
      This method is executed asynchronously
      Specified by:
        `executeAsyncImpl` in interface `WorkflowTask<C extends ClientContext>`
      Overrides:
        `executeAsyncImpl` in class `AbstractWFT<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>`

    - #### doneTaskProceeded

          protected void doneTaskProceeded(TaskEvent e)

      Overrides:
        `doneTaskProceeded` in class `AbstractSwingTask<C extends ClientContext>`

    - #### doneTaskFinished

          protected void doneTaskFinished(TaskEvent e)

      Overrides:
        `doneTaskFinished` in class `AbstractSwingTask<C extends ClientContext>`

    - #### setTransferLocked

          public void setTransferLocked(boolean isLocked)

    - #### setJob

          public void setJob(FileStreamJob job)

    - #### getJob

          public FileStreamJob getJob()

    - #### getFileDataType

          public FileDataType getFileDataType()

    - #### getJobId

          public JobId getJobId()

    - #### readBinaryStream

          protected void readBinaryStream(DownloadStream stream)
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readAsciiStream

          protected void readAsciiStream(DownloadReader reader)
                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.