Package com.tnsai.channels.api
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 TypeMethodDescriptionvoidonError(ChannelError error) Called when the adapter encounters an error.voidonMessage(UnifiedMessage message) Called when a message arrives from the channel.voidCalled when the remote user starts typing.
-
Method Details
-
onMessage
Called when a message arrives from the channel.- Parameters:
message- the platform-agnostic inbound message
-
onTyping
Called when the remote user starts typing.- Parameters:
conversationId- the conversation where typing is happening
-
onError
Called when the adapter encounters an error.- Parameters:
error- details about what went wrong
-