Interface NotificationChannel

All Known Implementing Classes:
EmailNotificationChannel, SlackNotificationChannel, TwilioNotificationChannel

public interface NotificationChannel
Interface for handling post-treatment actions related to responses in the ChatMotor framework.

This interface defines methods for notifying users when a document is available and for sending the actual document through different communication channels such as Slack, Email, SMS with Twilio, and other platforms.

The goal is to provide a flexible framework that allows for new implementations of various communication channels, such as Notion, Airtable, and your own IT platform.

Since:
1.2
  • Method Details

    • notifyDocumentAvailable

      MotorNotifyResponse notifyDocumentAvailable​(String filePath, ExecutionMode mode)
      Notifies the user that a response document is available.
      Parameters:
      filePath - the file path of the response document that is available
      mode - the execution mode, either synchronous (SYNC) or asynchronous (ASYNC)
      Returns:
      a MotorNotifyResponse object containing the result of the notification process
    • dispatchDocument

      MotorNotifyResponse dispatchDocument​(String filePath, ExecutionMode mode)
      Sends the generated response document to the user.
      Parameters:
      filePath - the file path of the response document to be sent
      mode - the execution mode, either synchronous (SYNC) or asynchronous (ASYNC)
      Returns:
      a MotorNotifyResponse object containing the result of the document dispatch process