Package com.tietoenator.trip.jxp.session

# Class TdbNotificationSink

java.lang.Object
com.tietoenator.trip.jxp.session.TdbSessionObject
com.tietoenator.trip.jxp.TdbMessageProvider
com.tietoenator.trip.jxp.session.TdbNotificationSink

public class TdbNotificationSink extends TdbMessageProvider
Provides a means for handling notification messages such as sent by the comforter mechanism to be sunk through the client application. This is a base class that must be extended in order to provide more than a no-op behavior. To be informed when notification events occur 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 NotificationSink property. When a notification is received from the server, one of the OnXXX methods will be called (OnSearchComforter, etc).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TdbNotificationSink(TdbSession session)`
  Constructor, creates a notification sink with default, no-op handlers.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `onGraphComforter(TdbGraphNotification notificationDetail)`
  Provides information on the current graph analysis state.
  `boolean`
  `onSearchComforter(String msg)`
  Handler for search comforter notifications.
  `boolean`
  `onSortComforter(String msg)`
  Handler for sort comforter notifications.

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

- ## Constructor Details

  - ### TdbNotificationSink

    public TdbNotificationSink(TdbSession session) throws TdbException
    Constructor, creates a notification sink with default, no-op handlers.
    Parameters:
      `session` - Active NET session
    Throws:
      `TdbException`

- ## Method Details

  - ### onSearchComforter

    public boolean onSearchComforter(String msg)
    Handler for search comforter notifications. This is a default implementation that always returns true. Override this method in a subclass in order to enable your application to react to search comforter messages.
    Parameters:
      `msg` - Comforter message
    Returns:
      True to continue searching and false to abort.

  - ### onSortComforter

    public boolean onSortComforter(String msg)
    Handler for sort comforter notifications. This is a default implementation that always returns true. Override this method in a subclass in order to enable your application to react to sort comforter messages.
    Parameters:
      `msg` - Comforter message
    Returns:
      True to continue sorting and false to abort.

  - ### onGraphComforter

    public boolean onGraphComforter(TdbGraphNotification notificationDetail)
    Provides information on the current graph analysis state.
    Parameters:
      `notificationDetail` - Object holding information on the current analysis state
    Returns:
      True to continue the analysis and false to halt it.