de.esprit.appsuite.task

## Class DebugTaskMonitor<C extends ApplicationContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.task.monitor.AbstractTaskMonitor<C>
      - - de.esprit.appsuite.task.DefaultTaskMonitor<C>
        - - de.esprit.appsuite.task.DebugTaskMonitor<C>

- All Implemented Interfaces:
    ApplicationObject<C>, TaskMonitor<C>, SimpleLogSupport, Dumpable

      public class DebugTaskMonitor<C extends ApplicationContext>
      extends DefaultTaskMonitor<C>

  This class is just for testing task notifications
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DebugTaskMonitor(C ctx)`
    `DebugTaskMonitor(C ctx, LogChannel logCh, java.lang.String logPrefix)`
    `DebugTaskMonitor(C ctx, java.lang.String logPrefix)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `taskCancelled(RunStateFlag stateFlag)` Called when the async task has discovered that it was cancelled
    `void` | `taskChildFinished(RunStateFlag stateFlag)` Indicates that a child task has been finished.
    `void` | `taskChildStarted(RunStateFlag stateFlag)` Indicates that a child task has been started.
    `void` | `taskChildSucceeded(RunStateFlag stateFlag, java.lang.Object result)` Indicates that a child task has been succeeded with the given result.
    `void` | `taskFailed(RunStateFlag stateFlag, java.lang.Exception e)` Called when the async task failed
    `void` | `taskFinished(RunStateFlag stateFlag)` Called when the async task finished
    `void` | `taskProceeded(RunStateFlag stateFlag, java.lang.Object result, int step, int maxSteps, java.lang.String message)` Is called on task progress.
    `void` | `taskStarted(RunStateFlag stateFlag)` Called when the async task started
    `void` | `taskSucceeded(RunStateFlag stateFlag, java.lang.Object result)` Called when the async task succeeded

    - ### Methods inherited from class de.esprit.appsuite.task.monitor.AbstractTaskMonitor

      `accept`

    - ### 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, 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.launch.ApplicationObject

      `getApplicationContext`

- - ### Constructor Detail

    - #### DebugTaskMonitor

          public DebugTaskMonitor(C ctx)

    - #### DebugTaskMonitor

          public DebugTaskMonitor(C ctx,
                          java.lang.String logPrefix)

    - #### DebugTaskMonitor

          public DebugTaskMonitor(C ctx,
                          LogChannel logCh,
                          java.lang.String logPrefix)

  - ### Method Detail

    - #### taskStarted

          public void taskStarted(RunStateFlag stateFlag)

      Description copied from interface: `TaskMonitor`
      Called when the async task started
      Specified by:
        `taskStarted` in interface `TaskMonitor<C extends ApplicationContext>`
      Overrides:
        `taskStarted` in class `DefaultTaskMonitor<C extends ApplicationContext>`

    - #### taskProceeded

          public void taskProceeded(RunStateFlag stateFlag,
                           java.lang.Object result,
                           int step,
                           int maxSteps,
                           java.lang.String message)

      Description copied from interface: `TaskMonitor`
      Is called on task progress.
      Specified by:
        `taskProceeded` in interface `TaskMonitor<C extends ApplicationContext>`
      Overrides:
        `taskProceeded` in class `DefaultTaskMonitor<C extends ApplicationContext>`
        `result` - may be anything the running task has produced (i.e. a DBRecord)
        `step` - the number of steps performed
        `maxSteps` - the maximum number of steps expected (0 if not known)

    - #### taskSucceeded

          public void taskSucceeded(RunStateFlag stateFlag,
                           java.lang.Object result)

      Description copied from interface: `TaskMonitor`
      Called when the async task succeeded
      Specified by:
        `taskSucceeded` in interface `TaskMonitor<C extends ApplicationContext>`
      Overrides:
        `taskSucceeded` in class `DefaultTaskMonitor<C extends ApplicationContext>`

    - #### taskCancelled

          public void taskCancelled(RunStateFlag stateFlag)

      Description copied from interface: `TaskMonitor`
      Called when the async task has discovered that it was cancelled
      Specified by:
        `taskCancelled` in interface `TaskMonitor<C extends ApplicationContext>`
      Overrides:
        `taskCancelled` in class `DefaultTaskMonitor<C extends ApplicationContext>`

    - #### taskFailed

          public void taskFailed(RunStateFlag stateFlag,
                        java.lang.Exception e)

      Description copied from interface: `TaskMonitor`
      Called when the async task failed
      Specified by:
        `taskFailed` in interface `TaskMonitor<C extends ApplicationContext>`
      Overrides:
        `taskFailed` in class `DefaultTaskMonitor<C extends ApplicationContext>`

    - #### taskFinished

          public void taskFinished(RunStateFlag stateFlag)

      Description copied from interface: `TaskMonitor`
      Called when the async task finished
      Specified by:
        `taskFinished` in interface `TaskMonitor<C extends ApplicationContext>`
      Overrides:
        `taskFinished` in class `DefaultTaskMonitor<C extends ApplicationContext>`

    - #### taskChildStarted

          public void taskChildStarted(RunStateFlag stateFlag)

      Description copied from interface: `TaskMonitor`
      Indicates that a child task has been started. Note that the child's taskId will be available from the RunState's taskId by `RunStateFlag.getCurrentChild()`;
      Specified by:
        `taskChildStarted` in interface `TaskMonitor<C extends ApplicationContext>`
      Overrides:
        `taskChildStarted` in class `DefaultTaskMonitor<C extends ApplicationContext>`

    - #### taskChildSucceeded

          public void taskChildSucceeded(RunStateFlag stateFlag,
                                java.lang.Object result)

      Description copied from interface: `TaskMonitor`
      Indicates that a child task has been succeeded with the given result.
      Specified by:
        `taskChildSucceeded` in interface `TaskMonitor<C extends ApplicationContext>`
      Overrides:
        `taskChildSucceeded` in class `DefaultTaskMonitor<C extends ApplicationContext>`

    - #### taskChildFinished

          public void taskChildFinished(RunStateFlag stateFlag)

      Description copied from interface: `TaskMonitor`
      Indicates that a child task has been finished.
      Specified by:
        `taskChildFinished` in interface `TaskMonitor<C extends ApplicationContext>`
      Overrides:
        `taskChildFinished` in class `DefaultTaskMonitor<C extends ApplicationContext>`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.