UpdateActivityHandler Interface

public interface UpdateActivityHandler

A method that can participate in update activity events for the current turn.

Method Summary

Modifier and Type Method and Description
abstract java.util.concurrent.CompletableFuture<ResourceResponse> invoke(TurnContext context, Activity activity, Supplier<CompletableFuture<ResourceResponse>> next)

A method that can participate in update activity events for the current turn.

Method Details

invoke

public abstract CompletableFuture invoke(TurnContext context, Activity activity, Supplier> next)

A method that can participate in update activity events for the current turn.

Parameters:

context - The context object for the turn.
activity - The replacement activity.
next - The delegate to call to continue event processing.

Returns:

A task that represents the work queued to execute. A handler calls the next delegate to pass control to the next registered handler. If a handler doesn\u2019t call the next delegate, the adapter does not call any of the subsequent handlers and does not update the activity.

The activity's Activity#getId indicates the activity in the conversation to replace. If the activity is successfully sent, the <paramref name="next"/> delegate returns a ResourceResponse object containing the ID that the receiving channel assigned to the activity. Use this response object as the return value of this handler.

Applies to