TeamsActivityHandler Class

public class TeamsActivityHandler
extends ActivityHandler

A Teams implementation of the Bot interface intended for further subclassing. Derive from this class to plug in code to handle particular Activity types. Pre and post processing of Activities can be plugged in by deriving and calling the base class implementation.

Constructor Summary

Constructor Description
TeamsActivityHandler()

Method Summary

Modifier and Type Method and Description
protected java.util.concurrent.CompletableFuture<T> <T>notImplemented()

Invoke a new InvokeResponseException with a HTTP 501 code status.

protected java.util.concurrent.CompletableFuture<T> <T>notImplemented(String body)

Invoke a new InvokeResponseException with a HTTP 501 code status.

protected java.util.concurrent.CompletableFuture<T> <T>withException(Throwable t)

Error handler that can catch exceptions.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onConversationUpdateActivity(TurnContext turnContext)

Invoked when a conversation update activity is received from the channel.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onEventActivity(TurnContext turnContext)

Invoked when a "tokens/response" event is received when the base behavior of onEventActivity(TurnContext turnContext) is used.

protected java.util.concurrent.CompletableFuture<InvokeResponse> onInvokeActivity(TurnContext turnContext)

Invoked when an invoke activity is received from the connector when the base behavior of onTurn is used.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onSignInInvoke(TurnContext turnContext)

Invoked when a signIn invoke activity is received from the connector.

protected java.util.concurrent.CompletableFuture<MessagingExtensionResponse> onTeamsAppBasedLinkQuery(TurnContext turnContext, AppBasedLinkQuery query)

Invoked when an app based link query activity is received from the connector.

protected java.util.concurrent.CompletableFuture<InvokeResponse> onTeamsCardActionInvoke(TurnContext turnContext)

Invoked when a card action invoke activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsChannelCreated(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Created event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsChannelDeleted(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Deleted event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsChannelRenamed(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Renamed event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsChannelRestored(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Restored event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<InvokeResponse> onTeamsFileConsent(TurnContext turnContext, FileConsentCardResponse fileConsentCardResponse)

Invoked when a file consent card activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsFileConsentAccept(TurnContext turnContext, FileConsentCardResponse fileConsentCardResponse)

Invoked when a file consent card is accepted by the user.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsFileConsentDecline(TurnContext turnContext, FileConsentCardResponse fileConsentCardResponse)

Invoked when a file consent card is declined by the user.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsMeetingEnd(MeetingEndEventDetails meeting, TurnContext turnContext)

Invoked when a Teams Meeting End event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsMeetingStart(MeetingStartEventDetails meeting, TurnContext turnContext)

Invoked when a Teams Meeting Start event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsMembersAdded(List<TeamsChannelAccount> membersAdded, TeamInfo teamInfo, TurnContext turnContext)

Override this in a derived class to provide logic for when members other than the bot join the channel, such as your bot's welcome logic.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsMembersAddedDispatch(List<ChannelAccount> membersAdded, TeamInfo teamInfo, TurnContext turnContext)

Override this in a derived class to provide logic for when members other than the bot join the channel, such as your bot's welcome logic.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsMembersRemoved(List<TeamsChannelAccount> membersRemoved, TeamInfo teamInfo, TurnContext turnContext)

Override this in a derived class to provide logic for when members other than the bot leave the channel, such as your bot's good-bye logic.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsMembersRemovedDispatch(List<ChannelAccount> membersRemoved, TeamInfo teamInfo, TurnContext turnContext)

Override this in a derived class to provide logic for when members other than the bot leave the channel, such as your bot's good-bye logic.

protected java.util.concurrent.CompletableFuture<MessagingExtensionActionResponse> onTeamsMessagingExtensionBotMessagePreviewEdit(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a messaging extension bot message preview edit activity is received from the connector.

protected java.util.concurrent.CompletableFuture<MessagingExtensionActionResponse> onTeamsMessagingExtensionBotMessagePreviewSend(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a messaging extension bot message preview send activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsMessagingExtensionCardButtonClicked(TurnContext turnContext, Object cardData)

Override this in a derived class to provide logic for when a card button is clicked in a messaging extension.

protected java.util.concurrent.CompletableFuture<MessagingExtensionResponse> onTeamsMessagingExtensionConfigurationQuerySettingUrl(TurnContext turnContext, MessagingExtensionQuery query)

Invoked when a messaging extension configuration query setting url activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsMessagingExtensionConfigurationSetting(TurnContext turnContext, Object settings)

Override this in a derived class to provide logic for when a configuration is set for a messaging extension.

protected java.util.concurrent.CompletableFuture<MessagingExtensionActionResponse> onTeamsMessagingExtensionFetchTask(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a Messaging Extension Fetch activity is received from the connector.

protected java.util.concurrent.CompletableFuture<MessagingExtensionResponse> onTeamsMessagingExtensionQuery(TurnContext turnContext, MessagingExtensionQuery query)

Invoked when a Messaging Extension Query activity is received from the connector.

protected java.util.concurrent.CompletableFuture<MessagingExtensionResponse> onTeamsMessagingExtensionSelectItem(TurnContext turnContext, Object query)

Invoked when a messaging extension select item activity is received from the connector.

protected java.util.concurrent.CompletableFuture<MessagingExtensionActionResponse> onTeamsMessagingExtensionSubmitAction(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a messaging extension submit action activity is received from the connector.

protected java.util.concurrent.CompletableFuture<MessagingExtensionActionResponse> onTeamsMessagingExtensionSubmitActionDispatch(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a messaging extension submit action dispatch activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsO365ConnectorCardAction(TurnContext turnContext, O365ConnectorCardActionQuery query)

Invoked when a O365 Connector Card Action activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsSigninVerifyState(TurnContext turnContext)

Invoked when a signIn verify state activity is received from the connector.

protected java.util.concurrent.CompletableFuture<TabResponse> onTeamsTabFetch(TurnContext turnContext, TabRequest tabRequest)

Override this in a derived class to provide logic for when a tab is fetched.

protected java.util.concurrent.CompletableFuture<TabResponse> onTeamsTabSubmit(TurnContext turnContext, TabSubmit tabSubmit)

Override this in a derived class to provide logic for when a tab is submitted.

protected java.util.concurrent.CompletableFuture<TaskModuleResponse> onTeamsTaskModuleFetch(TurnContext turnContext, TaskModuleRequest taskModuleRequest)

Override this in a derived class to provide logic for when a task module is fetched.

protected java.util.concurrent.CompletableFuture<TaskModuleResponse> onTeamsTaskModuleSubmit(TurnContext turnContext, TaskModuleRequest taskModuleRequest)

Override this in a derived class to provide logic for when a task module is submited.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsTeamArchived(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Archived event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsTeamDeleted(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Deleted event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsTeamHardDeleted(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Hard Deleted event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsTeamRenamed(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Renamed event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsTeamRestored(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Restored event activity is received from the connector.

protected java.util.concurrent.CompletableFuture<java.lang.Void> onTeamsTeamUnarchived(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Unarchived event activity is received from the connector.

Methods inherited from ActivityHandler

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

TeamsActivityHandler

public TeamsActivityHandler()

Method Details

<T>notImplemented

protected CompletableFuture notImplemented()

Invoke a new InvokeResponseException with a HTTP 501 code status.

Returns:

true if this invocation caused this CompletableFuture to transition to a completed state, else false

<T>notImplemented

protected CompletableFuture notImplemented(String body)

Invoke a new InvokeResponseException with a HTTP 501 code status.

Parameters:

body - The body for the InvokeResponseException.

Returns:

true if this invocation caused this CompletableFuture to transition to a completed state, else false

<T>withException

protected CompletableFuture withException(Throwable t)

Error handler that can catch exceptions.

Parameters:

t - The exception thrown.

Returns:

A task that represents the work queued to execute.

onConversationUpdateActivity

protected CompletableFuture onConversationUpdateActivity(TurnContext turnContext)

Invoked when a conversation update activity is received from the channel. Conversation update activities are useful when it comes to responding to users being added to or removed from the channel. For example, a bot could respond to a user being added by greeting the user.

Overrides:

TeamsActivityHandler.onConversationUpdateActivity(TurnContext turnContext)

Parameters:

turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onEventActivity

protected CompletableFuture onEventActivity(TurnContext turnContext)

Invoked when a "tokens/response" event is received when the base behavior of onEventActivity(TurnContext turnContext) is used.

If using an OAuthPrompt, override this method to forward this Activity to the current dialog.

By default, this method does nothing.

When the onEventActivity(TurnContext turnContext) method receives an event with a com.microsoft.bot.schema.Activity#getName() of `tokens/response`, it calls this method.

Overrides:

TeamsActivityHandler.onEventActivity(TurnContext turnContext)

Parameters:

turnContext - The context object for this turn.

Returns:

A task that represents the work queued to execute.

onInvokeActivity

protected CompletableFuture onInvokeActivity(TurnContext turnContext)

Invoked when an invoke activity is received from the connector when the base behavior of onTurn is used.

Overrides:

TeamsActivityHandler.onInvokeActivity(TurnContext turnContext)

Parameters:

turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onSignInInvoke

protected CompletableFuture onSignInInvoke(TurnContext turnContext)

Invoked when a signIn invoke activity is received from the connector.

Overrides:

TeamsActivityHandler.onSignInInvoke(TurnContext turnContext)

Parameters:

turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsAppBasedLinkQuery

protected CompletableFuture onTeamsAppBasedLinkQuery(TurnContext turnContext, AppBasedLinkQuery query)

Invoked when an app based link query activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
query - The invoke request body type for app-based link query.

Returns:

The Messaging Extension Response for the query.

onTeamsCardActionInvoke

protected CompletableFuture onTeamsCardActionInvoke(TurnContext turnContext)

Invoked when a card action invoke activity is received from the connector.

Parameters:

turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsChannelCreated

protected CompletableFuture onTeamsChannelCreated(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Created event activity is received from the connector. Channel Created correspond to the user creating a new channel.

Parameters:

channelInfo - The channel info object which describes the channel.
teamInfo - The team info object representing the team.
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsChannelDeleted

protected CompletableFuture onTeamsChannelDeleted(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Deleted event activity is received from the connector. Channel Deleted correspond to the user deleting an existing channel.

Parameters:

channelInfo - The channel info object which describes the channel.
teamInfo - The team info object representing the team.
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsChannelRenamed

protected CompletableFuture onTeamsChannelRenamed(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Renamed event activity is received from the connector. Channel Renamed correspond to the user renaming an existing channel.

Parameters:

channelInfo - The channel info object which describes the channel.
teamInfo - The team info object representing the team.
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsChannelRestored

protected CompletableFuture onTeamsChannelRestored(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Restored event activity is received from the connector. Channel Restored correspond to the user restoring a previously deleted channel.

Parameters:

channelInfo - The channel info object which describes the channel.
teamInfo - The team info object representing the team.
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsFileConsent

protected CompletableFuture onTeamsFileConsent(TurnContext turnContext, FileConsentCardResponse fileConsentCardResponse)

Invoked when a file consent card activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
fileConsentCardResponse - The response representing the value of the invoke activity sent when the user acts on a file consent card.

Returns:

An InvokeResponse depending on the action of the file consent card.

onTeamsFileConsentAccept

protected CompletableFuture onTeamsFileConsentAccept(TurnContext turnContext, FileConsentCardResponse fileConsentCardResponse)

Invoked when a file consent card is accepted by the user.

Parameters:

turnContext - The current TurnContext.
fileConsentCardResponse - The response representing the value of the invoke activity sent when the user accepts a file consent card.

Returns:

A task that represents the work queued to execute.

onTeamsFileConsentDecline

protected CompletableFuture onTeamsFileConsentDecline(TurnContext turnContext, FileConsentCardResponse fileConsentCardResponse)

Invoked when a file consent card is declined by the user.

Parameters:

turnContext - The current TurnContext.
fileConsentCardResponse - The response representing the value of the invoke activity sent when the user declines a file consent card.

Returns:

A task that represents the work queued to execute.

onTeamsMeetingEnd

protected CompletableFuture onTeamsMeetingEnd(MeetingEndEventDetails meeting, TurnContext turnContext)

Invoked when a Teams Meeting End event activity is received from the connector. Override this in a derived class to provide logic for when a meeting is ended.

Parameters:

meeting - The details of the meeting.
turnContext - The context object for this turn.

Returns:

A task that represents the work queued to execute.

onTeamsMeetingStart

protected CompletableFuture onTeamsMeetingStart(MeetingStartEventDetails meeting, TurnContext turnContext)

Invoked when a Teams Meeting Start event activity is received from the connector. Override this in a derived class to provide logic for when a meeting is started.

Parameters:

meeting - The details of the meeting.
turnContext - The context object for this turn.

Returns:

A task that represents the work queued to execute.

onTeamsMembersAdded

protected CompletableFuture onTeamsMembersAdded(List membersAdded, TeamInfo teamInfo, TurnContext turnContext)

Override this in a derived class to provide logic for when members other than the bot join the channel, such as your bot's welcome logic.

Parameters:

membersAdded - A list of all the members added to the channel, as described by the conversation update activity.
teamInfo - The team info object representing the team.
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsMembersAddedDispatch

protected CompletableFuture onTeamsMembersAddedDispatch(List membersAdded, TeamInfo teamInfo, TurnContext turnContext)

Override this in a derived class to provide logic for when members other than the bot join the channel, such as your bot's welcome logic. It will get the associated members with the provided accounts.

Parameters:

membersAdded - A list of all the accounts added to the channel, as described by the conversation update activity.
teamInfo - The team info object representing the team.
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsMembersRemoved

protected CompletableFuture onTeamsMembersRemoved(List membersRemoved, TeamInfo teamInfo, TurnContext turnContext)

Override this in a derived class to provide logic for when members other than the bot leave the channel, such as your bot's good-bye logic.

Parameters:

membersRemoved - A list of all the members removed from the channel, as described by the conversation update activity.
teamInfo - The team info object representing the team.
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsMembersRemovedDispatch

protected CompletableFuture onTeamsMembersRemovedDispatch(List membersRemoved, TeamInfo teamInfo, TurnContext turnContext)

Override this in a derived class to provide logic for when members other than the bot leave the channel, such as your bot's good-bye logic. It will get the associated members with the provided accounts.

Parameters:

membersRemoved - A list of all the accounts removed from the channel, as described by the conversation update activity.
teamInfo - The team info object representing the team.
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsMessagingExtensionBotMessagePreviewEdit

protected CompletableFuture onTeamsMessagingExtensionBotMessagePreviewEdit(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a messaging extension bot message preview edit activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
action - The messaging extension action.

Returns:

The Messaging Extension Action Response for the action.

onTeamsMessagingExtensionBotMessagePreviewSend

protected CompletableFuture onTeamsMessagingExtensionBotMessagePreviewSend(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a messaging extension bot message preview send activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
action - The messaging extension action.

Returns:

The Messaging Extension Action Response for the action.

onTeamsMessagingExtensionCardButtonClicked

protected CompletableFuture onTeamsMessagingExtensionCardButtonClicked(TurnContext turnContext, Object cardData)

Override this in a derived class to provide logic for when a card button is clicked in a messaging extension.

Parameters:

turnContext - The current TurnContext.
cardData - Object representing the card data.

Returns:

A task that represents the work queued to execute.

onTeamsMessagingExtensionConfigurationQuerySettingUrl

protected CompletableFuture onTeamsMessagingExtensionConfigurationQuerySettingUrl(TurnContext turnContext, MessagingExtensionQuery query)

Invoked when a messaging extension configuration query setting url activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
query - The Messaging extension query.

Returns:

The Messaging Extension Response for the query.

onTeamsMessagingExtensionConfigurationSetting

protected CompletableFuture onTeamsMessagingExtensionConfigurationSetting(TurnContext turnContext, Object settings)

Override this in a derived class to provide logic for when a configuration is set for a messaging extension.

Parameters:

turnContext - The current TurnContext.
settings - Object representing the configuration settings.

Returns:

A task that represents the work queued to execute.

onTeamsMessagingExtensionFetchTask

protected CompletableFuture onTeamsMessagingExtensionFetchTask(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a Messaging Extension Fetch activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
action - The messaging extension action.

Returns:

The Messaging Extension Action Response for the action.

onTeamsMessagingExtensionQuery

protected CompletableFuture onTeamsMessagingExtensionQuery(TurnContext turnContext, MessagingExtensionQuery query)

Invoked when a Messaging Extension Query activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
query - The query for the search command.

Returns:

The Messaging Extension Response for the query.

onTeamsMessagingExtensionSelectItem

protected CompletableFuture onTeamsMessagingExtensionSelectItem(TurnContext turnContext, Object query)

Invoked when a messaging extension select item activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
query - The object representing the query.

Returns:

The Messaging Extension Response for the query.

onTeamsMessagingExtensionSubmitAction

protected CompletableFuture onTeamsMessagingExtensionSubmitAction(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a messaging extension submit action activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
action - The messaging extension action.

Returns:

The Messaging Extension Action Response for the action.

onTeamsMessagingExtensionSubmitActionDispatch

protected CompletableFuture onTeamsMessagingExtensionSubmitActionDispatch(TurnContext turnContext, MessagingExtensionAction action)

Invoked when a messaging extension submit action dispatch activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
action - The messaging extension action.

Returns:

The Messaging Extension Action Response for the action.

onTeamsO365ConnectorCardAction

protected CompletableFuture onTeamsO365ConnectorCardAction(TurnContext turnContext, O365ConnectorCardActionQuery query)

Invoked when a O365 Connector Card Action activity is received from the connector.

Parameters:

turnContext - The current TurnContext.
query - The O365 connector card HttpPOST invoke query.

Returns:

A task that represents the work queued to execute.

onTeamsSigninVerifyState

protected CompletableFuture onTeamsSigninVerifyState(TurnContext turnContext)

Invoked when a signIn verify state activity is received from the connector.

Parameters:

turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsTabFetch

protected CompletableFuture onTeamsTabFetch(TurnContext turnContext, TabRequest tabRequest)

Override this in a derived class to provide logic for when a tab is fetched.

Parameters:

turnContext - The context object for this turn.
tabRequest - The tab invoke request value payload.

Returns:

A Tab Response for the request.

onTeamsTabSubmit

protected CompletableFuture onTeamsTabSubmit(TurnContext turnContext, TabSubmit tabSubmit)

Override this in a derived class to provide logic for when a tab is submitted.

Parameters:

turnContext - The context object for this turn.
tabSubmit - The tab submit invoke request value payload.

Returns:

A Tab Response for the request.

onTeamsTaskModuleFetch

protected CompletableFuture onTeamsTaskModuleFetch(TurnContext turnContext, TaskModuleRequest taskModuleRequest)

Override this in a derived class to provide logic for when a task module is fetched.

Parameters:

turnContext - The current TurnContext.
taskModuleRequest - The task module invoke request value payload.

Returns:

A Task Module Response for the request.

onTeamsTaskModuleSubmit

protected CompletableFuture onTeamsTaskModuleSubmit(TurnContext turnContext, TaskModuleRequest taskModuleRequest)

Override this in a derived class to provide logic for when a task module is submited.

Parameters:

turnContext - The current TurnContext.
taskModuleRequest - The task module invoke request value payload.

Returns:

A Task Module Response for the request.

onTeamsTeamArchived

protected CompletableFuture onTeamsTeamArchived(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Archived event activity is received from the connector. Team Archived correspond to the user archiving a team.

Parameters:

channelInfo
teamInfo
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsTeamDeleted

protected CompletableFuture onTeamsTeamDeleted(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Deleted event activity is received from the connector. Team Deleted correspond to the user deleting a team.

Parameters:

channelInfo
teamInfo
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsTeamHardDeleted

protected CompletableFuture onTeamsTeamHardDeleted(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Hard Deleted event activity is received from the connector. Team Hard Deleted correspond to the user hard-deleting a team.

Parameters:

channelInfo
teamInfo
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsTeamRenamed

protected CompletableFuture onTeamsTeamRenamed(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Channel Renamed event activity is received from the connector. Channel Renamed correspond to the user renaming an existing channel.

Parameters:

channelInfo - The channel info object which describes the channel.
teamInfo - The team info object representing the team.
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsTeamRestored

protected CompletableFuture onTeamsTeamRestored(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Restored event activity is received from the connector. Team Restored correspond to the user restoring a team.

Parameters:

channelInfo
teamInfo
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

onTeamsTeamUnarchived

protected CompletableFuture onTeamsTeamUnarchived(ChannelInfo channelInfo, TeamInfo teamInfo, TurnContext turnContext)

Invoked when a Team Unarchived event activity is received from the connector. Team Unarchived correspond to the user unarchiving a team.

Parameters:

channelInfo
teamInfo
turnContext - The current TurnContext.

Returns:

A task that represents the work queued to execute.

Applies to