com.tietoenator.trip.jxp.session

## Class TdbBackgroundTaskSink

- java.lang.Object
- - com.tietoenator.trip.jxp.session.TdbSessionObject
  - - com.tietoenator.trip.jxp.TdbMessageProvider
    - - com.tietoenator.trip.jxp.session.TdbBackgroundTaskSink

-     public abstract class TdbBackgroundTaskSink
      extends TdbMessageProvider

  Define an object of this type to receive notification of the completion background tasks (PRINT, INDEX, etc).

  To be informed when background tasks complete on the server, derive a new class from this base class and provide an object of that new class to the appropriate TdbSession using the BackgroundTaskSink property. When background tasks complete on the server, the TaskCompleted method of the new object will be invoked during the deserialization process of the server's response.

  Consider implementing the TdbJobResultSink as an alterative to get more complete completion information for LOAD and INDEX jobs submitted via the submitBatchJob method of the TdbDatabaseDesign class.

  See Also:
    `TdbJobResultSink`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.lang.String>` | `files()` Retrieve the list of file names (logfiles) associated with the sink event
    `java.util.List<java.lang.String>` | `messages()` Retrieve the list of completion messages associated with the sink event
    `void` | `poll()` Poll the server for any updates
    `abstract void` | `taskCompleted()` This abstract method must be overridden in concrete instantiations of this base class, and is called in the face of completion events from the server.

    - ### Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider

      `codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages`

    - ### Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject

      `cancel, getSession, isCancelable, setCancelable`

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### messages

          public java.util.List<java.lang.String> messages()

      Retrieve the list of completion messages associated with the sink event
      Returns:
        The list of available completion messages

    - #### files

          public java.util.List<java.lang.String> files()

      Retrieve the list of file names (logfiles) associated with the sink event
      Returns:
        The list of available logfile names

    - #### poll

          public void poll()
                    throws TdbException

      Poll the server for any updates
      Throws:
        `TdbException`

    - #### taskCompleted

          public abstract void taskCompleted()
                                      throws TdbException

      This abstract method must be overridden in concrete instantiations of this base class, and is called in the face of completion events from the server.
      Throws:
        `TdbException`