The entry point for all functionality in the Group Chat API is the GroupChatEndpoint class. All other functionality is tied directly to an instance of this class. To construct a Group Chat endpoint you first need to use Microsoft Unified Communications Managed API 2.0 Core SDK to connect to Microsoft Office Communications Server and obtain a instance. For information about working with local endpoints, see Microsoft.Rtc.Collaboration Namespace.
The Group Chat API is composed of a set of classes that include asynchronous methods, properties, and events. In order to provide adequate performance and to be consistent with the Unified Communications Managed API (UCMA) 2.0 Core SDK, the Group Chat API supports the BeginXxx/EndXxx pattern to implement asynchronous operations. The application programmer is expected to be familiar with this usage pattern. For more information, see Asynchronous Programming Overview.
The following illustration displays the main classes that you will work with in the Group Chat API.
Group Chat Endpoint
GroupChatEndpoint is the entry point for all of the functionality in the Group Chat API. The Group Chat endpoint provides access to a variety of management services, functionality for browsing the catalog of available chat rooms, references to actively joined chat room sessions, and methods for reviewing chat history.
To use this class:
Connect to Office Communications Server using the UCMA 2.0 Core SDK and get an instance of a LocalEndpoint.
Construct a GroupChatEndpoint with the LocalEndpoint instance.
Subscribe to necessary events and notifications.
Establish connectivity with the Group Chat server using the BeginEstablish(AsyncCallback, Object) method.
Group Chat Services
The GroupChatServices class provides access to a wide variety of group chat features and services. All administrative functionality and client services, with the exception of establishing a ChatRoomSession , are exposed through this object. In addition to the methods provided for browsing the catalog of available chat rooms, this class exposes the following properties:
Chat Room Session
The ChatRoomSession class provides functionality which can be used to participate in the conversation of a chat room. This object must be constructed with an established instance of GroupChatEndpoint . Once constructed, you can choose to subscribe to one or more events to be notified of incoming chat and changes to the metadata of the chat room. After all events are properly configured, you must invoke the BeginJoin(...)method to establish connectivity and enter the chat room.
Once the session has been joined, a reference to the ChatRoomSession will be stored in the collection of ActiveChatRoomSessions on the GroupChatEndpoint , and you may utilize any of the methods provided for interacting with the chat room. The session will remain active until you invoke the BeginLeave(...)method, which initiates a request to leave the chat room and cease the delivery of new messages and notifications.