Share via


composingState Element

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Notifies other users in an IM session that the caller is in the process of typing a message. Possible values are composing and idle.

Syntax

<composingState>"composing"|"Idle"></composingState> 

Enumerations

Possible Value

Data Type

composing

String

idle

String

Element Information

Parent Element

Element

Description

conference

Grouping for conference-related events.

Remarks

This message clears from the IM control after a default 5 seconds. This value is configurable. If more than 2 participants are in an IM conversation (conference), the newest composingState event is displayed.

Best Practice

  • Every endpoint should clear the notification after the specified refreshInterval configured time, even if an "idle" message has not been received - thus making "idle" optional.

  • A "composing" message should be sent after a user has begun typing. To determine the delay before sending the message, read the refreshInterval value and subtract 2 seconds. This gives you the best time interval from the beginning of typing to the sending of the message.

  • Do not send a "composing" message after every keystroke because the network will be flooded with these messages and effect performance adversely.

  • Given that a single composing message is displayed on an IM dialog for the number of seconds specified by refreshInterval, additional composing messages from other endpoints might arrive while the original composing message is still displayed. These messages should be handled as concurrent activity, which means that the composing message displayed on the IM dialog should be changed to "Multiple Users are Typing".

  • Maintain a data structure in memory that holds the sending SIP URI, message receipt time, and composing expiration time for each composing message arriving. Increment a counter variable as each message arrives. As each message expires, decrement the counter variable. When the value of your counter variable is 1, you should look at your data structure to determine which message has not expired. When you have determined which individual is still typing, change the composing message to indicate the identity of the single composer.

For example, Kim Akers might be in a conversation with Keith Harris. Keith begins typing. The composing message displayed for Kim would be "Keith Harris is typing". Simon Pearson is also participating in the conference and begins typing after Keith has been typing for 4 seconds. The composing message on your IM dialog should be changed on receipt of the composing message from Simon. The new message should indicate that both Keith and Simon are typing. Depending on how much space you have allotted for the composing string in your IM dialog, you might be able to display "Keith and Simon are typing". To simplify coding, however, "Multiple Users are Typing" conveys the appropriate meaning.

Examples

<composingState>idle</composingState>

See Also

Concepts

cwaEvents Element

conference Element

initiateImSession Element