Interface ChannelContext

All Known Implementing Classes:
MessageRouter

public interface ChannelContext
Callback interface provided to ChannelAdapter.start(com.tnsai.channels.api.ChannelContext). Adapters use this to deliver inbound events to the gateway.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the adapter encounters an error.
    void
    Called when a message arrives from the channel.
    void
    onTyping(String conversationId)
    Called when the remote user starts typing.
  • Method Details

    • onMessage

      void onMessage(UnifiedMessage message)
      Called when a message arrives from the channel.
      Parameters:
      message - the platform-agnostic inbound message
    • onTyping

      void onTyping(String conversationId)
      Called when the remote user starts typing.
      Parameters:
      conversationId - the conversation where typing is happening
    • onError

      void onError(ChannelError error)
      Called when the adapter encounters an error.
      Parameters:
      error - details about what went wrong