de.esprit.netsuite.server.batch

## Class TestBatchTask

- 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<S>
        - - de.esprit.netsuite.rtask.AbstractServerTask<S>
          - - de.esprit.netsuite.rtask.AbstractRemoteTask<S>
            - - de.esprit.netsuite.server.batch.AbstractBatchTask<ServerContext>
              - - de.esprit.netsuite.server.batch.TestBatchTask

- All Implemented Interfaces:
    ApplicationObject<ServerContext>, AsyncExecutable<ServerContext>, AsyncTask<ServerContext>, CancellableTask, LocalCancellableTask, TaskMonitorSupport, TaskIdHolder, SimpleLogSupport, Dumpable, Executable, RemoteCancellableTask, RemoteTask<ServerContext>, ServerObject<ServerContext>, java.lang.Runnable

      public class TestBatchTask
      extends AbstractBatchTask<ServerContext>

  This is server batch process for testing purposes only
  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
    `TestBatchTask(ServerContext ctx, BatchTaskConfigEntry cfg)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `executeAsync()` Must be overridden to perform the async part.

    - ### Methods inherited from class de.esprit.netsuite.server.batch.AbstractBatchTask

      `createTaskMonitor, doOnCancel, doOnFinish, doOnStart, equals, getCurrentFuture, getProcessConfigEntry, hashCode, lockDataSource, notifyProgress, notifyProgress, releaseLock, resetToDefaultDataSource, resetToPreviousDataSource, selectDataSource, setConfigEntry, submitForDirectExecution, submitForScheduledExecution, toString`

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

      `addMonitor, cancel, createRunStateFlag, createTaskId, getKillerSessionId, getOwnerSessionId, getRunStateFlag, getSessionId, getTaskId, setSessionId, submit, submit`

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

      `executeSubTask, getServerContext`

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

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

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

      `checkCancelled, checkForErrorAndRethrow, clearMonitors, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, 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, finalize, getClass, 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`

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

      `checkCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getType, handleCancellation, handleFailure, isCancellable, notifyProceeded, 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

      `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.common.type.Dumpable

      `toDumpString, toDumpString, toString`

    - ### Methods inherited from interface de.esprit.netsuite.server.ServerObject

      `getServerContext`

- - ### Constructor Detail

    - #### TestBatchTask

          public TestBatchTask(ServerContext ctx,
                       BatchTaskConfigEntry cfg)

  - ### Method Detail

    - #### executeAsync

          public void executeAsync()
                            throws java.lang.Exception

      Description copied from class: `AbstractAsyncTask`
      Must be overridden to perform the async part. From within this method you may directly call `AbstractAsyncTask.notifyProceeded(Object, int, int, String)` in order to notify about task progress. Note: the running task should periodically call `AbstractAsyncExecutable.checkCancelled()` in order to detect cancellation.
      Specified by:
        `executeAsync` in interface `AsyncExecutable<ServerContext>`
      Specified by:
        `executeAsync` in class `AbstractAsyncTask<ServerContext>`
      Throws:
        `java.lang.Exception`
      See Also:
        `for synchronous execution`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.