Interface TypingEventListener
-
- All Implemented Interfaces:
public interface TypingEventListenerListener for ChatClient.keystroke and ChatClient.stopTyping requests.
-
-
Method Summary
Modifier and Type Method Description abstract Result<Unit>onTypingEventPrecondition(String eventType, String channelType, String channelId, Map<Object, Object> extraData, Date eventTime)Runs this precondition before ChatClient.keystroke and ChatClient.stopTyping request is invoked. abstract UnitonTypingEventRequest(String eventType, String channelType, String channelId, Map<Object, Object> extraData, Date eventTime)Runs this side effect before ChatClient.keystroke and ChatClient.stopTyping request is invoked. abstract UnitonTypingEventResult(Result<ChatEvent> result, String eventType, String channelType, String channelId, Map<Object, Object> extraData, Date eventTime)Runs this side effect after ChatClient.keystroke and ChatClient.stopTyping request is completed. -
-
Method Detail
-
onTypingEventPrecondition
abstract Result<Unit> onTypingEventPrecondition(String eventType, String channelType, String channelId, Map<Object, Object> extraData, Date eventTime)
Runs this precondition before ChatClient.keystroke and ChatClient.stopTyping request is invoked.
- Parameters:
eventType- Type of the event that can be one of the EventType.TYPING_START or EventType.TYPING_STOP etc.channelType- Type of the channel in which the event is sent.channelId- Id of the channel in which the event is sent.extraData- Any extra data such as parent id.eventTime- Date object as the time of this event.- Returns:
Result having Unit if precondition passes otherwise Error describing what went wrong.
-
onTypingEventRequest
abstract Unit onTypingEventRequest(String eventType, String channelType, String channelId, Map<Object, Object> extraData, Date eventTime)
Runs this side effect before ChatClient.keystroke and ChatClient.stopTyping request is invoked.
- Parameters:
eventType- Type of the event that can be one of the EventType.TYPING_START or EventType.TYPING_STOP etc.channelType- Type of the channel in which the event is sent.channelId- Id of the channel in which the event is sent.extraData- Any extra data such as parent id.eventTime- Date object as the time of this event.
-
onTypingEventResult
abstract Unit onTypingEventResult(Result<ChatEvent> result, String eventType, String channelType, String channelId, Map<Object, Object> extraData, Date eventTime)
Runs this side effect after ChatClient.keystroke and ChatClient.stopTyping request is completed.
- Parameters:
result- Result of the original request.eventType- Type of the event that can be one of the EventType.TYPING_START or EventType.TYPING_STOP etc.channelType- Type of the channel in which the event is sent.channelId- Id of the channel in which the event is sent.extraData- Any extra data such as parent id.eventTime- Date object as the time of this event.
-
-
-
-