-
public final class ChatAdapterAzure android communication chat composite component.
Instantiating Chat Composite
-
-
Method Summary
Modifier and Type Method Description voidaddOnErrorEventHandler(ChatCompositeEventHandler<ChatCompositeErrorEvent> errorHandler)Add ChatCompositeEventHandler. voidremoveOnErrorEventHandler(ChatCompositeEventHandler<ChatCompositeErrorEvent> errorHandler)Remove ChatCompositeEventHandler. CompletableFuture<Void>connect(Context context)Connects to ACS service, starts realtime notifications. voiddisconnect()Disconnects from backend services. -
-
Method Detail
-
addOnErrorEventHandler
void addOnErrorEventHandler(ChatCompositeEventHandler<ChatCompositeErrorEvent> errorHandler)
Add ChatCompositeEventHandler.
A callback for Chat Composite Error Events.See ChatCompositeErrorEvent for values.
// add error handler chatAdapter.addOnErrorEventHandler(event -> { // Process error event System.out.println(event.getCause()); System.out.println(event.getErrorCode()); });- Parameters:
errorHandler- The ChatCompositeEventHandler.
-
removeOnErrorEventHandler
void removeOnErrorEventHandler(ChatCompositeEventHandler<ChatCompositeErrorEvent> errorHandler)
Remove ChatCompositeEventHandler.
A callback for Chat Composite Error Events.See ChatCompositeErrorEvent for values.
- Parameters:
errorHandler- The ChatCompositeEventHandler.
-
connect
CompletableFuture<Void> connect(Context context)
Connects to ACS service, starts realtime notifications.
-
disconnect
void disconnect()
Disconnects from backend services.
-
-
-
-