DelegatingTurnContext Class
- java.
lang. Object - com.
microsoft. bot. builder. DelegatingTurnContext
- com.
Implements
public class DelegatingTurnContext
implements TurnContext
A TurnContext that wraps an untyped inner TurnContext.
Constructor Summary
| Constructor | Description |
|---|---|
| DelegatingTurnContext(TurnContext withTurnContext) |
Initializes a new instance of the Delegating |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| java.util.concurrent.CompletableFuture<java.lang.Void> |
deleteActivity(ConversationReference conversationReference)
Deletes an existing activity. |
| java.util.concurrent.CompletableFuture<java.lang.Void> |
deleteActivity(String activityId)
Deletes an existing activity. |
| Activity |
getActivity()
Gets the inner context's activity. |
|
Bot |
getAdapter()
Gets the inner context's activity. |
| java.lang.String |
getLocale()
Gets the locale on this context object. |
| boolean |
getResponded()
Gets the inner context's responded value. |
|
Turn |
getTurnState()
Gets the inner context's activity. |
|
Turn |
onDeleteActivity(DeleteActivityHandler handler)
Adds a response handler for delete activity operations. |
|
Turn |
onSendActivities(SendActivitiesHandler handler)
Adds a response handler for send activity operations. |
|
Turn |
onUpdateActivity(UpdateActivityHandler handler)
Adds a response handler for update activity operations. |
|
java.util.concurrent.CompletableFuture<Resource |
sendActivities(List<Activity> activities)
Sends a list of activities to the sender of the incoming activity. |
|
java.util.concurrent.CompletableFuture<Resource |
sendActivity(Activity activity)
Sends an activity to the sender of the incoming activity. |
|
java.util.concurrent.CompletableFuture<Resource |
sendActivity(String textReplyToSend)
Sends a message activity to the sender of the incoming activity. |
|
java.util.concurrent.CompletableFuture<Resource |
sendActivity(String textReplyToSend, String speak)
Sends a message activity to the sender of the incoming activity. |
|
java.util.concurrent.CompletableFuture<Resource |
sendActivity(String textReplyToSend, String speak, InputHints inputHint)
Sends a message activity to the sender of the incoming activity. |
| void |
setLocale(String withLocale)
Set the locale on this context object. |
|
java.util.concurrent.CompletableFuture<Resource |
updateActivity(Activity activity)
Replaces an existing activity. |
Methods inherited from java.lang.Object
Constructor Details
DelegatingTurnContext
public DelegatingTurnContext(TurnContext withTurnContext)
Initializes a new instance of the DelegatingTurnContext class.
Parameters:
Method Details
deleteActivity
public CompletableFuture
Deletes an existing activity.
Parameters:
deleteActivity
public CompletableFuture
Deletes an existing activity.
Parameters:
getActivity
getAdapter
getLocale
public String getLocale()
Gets the locale on this context object.
Returns:
getResponded
public boolean getResponded()
Gets the inner context's responded value.
Returns:
getTurnState
public TurnContextStateCollection getTurnState()
Gets the inner context's activity.
Returns:
onDeleteActivity
public TurnContext onDeleteActivity(DeleteActivityHandler handler)
Adds a response handler for delete activity operations.
When the context's deleteActivity(String activityId) is called, the adapter calls the registered handlers in the order in which they were added to the context object.
Parameters:
onSendActivities
public TurnContext onSendActivities(SendActivitiesHandler handler)
Adds a response handler for send activity operations.
When the context's sendActivity(Activity activity) or sendActivities(List<Activity> activities) methods are called, the adapter calls the registered handlers in the order in which they were added to the context object.
Parameters:
onUpdateActivity
public TurnContext onUpdateActivity(UpdateActivityHandler handler)
Adds a response handler for update activity operations.
When the context's updateActivity(Activity activity) is called, the adapter calls the registered handlers in the order in which they were added to the context object.
Parameters:
sendActivities
public CompletableFuture
Sends a list of activities to the sender of the incoming activity.
If the activities are successfully sent, the task result contains an array of ResourceResponse objects containing the IDs that the receiving channel assigned to the activities.
Parameters:
sendActivity
public CompletableFuture
Sends an activity to the sender of the incoming activity.
Parameters:
sendActivity
public CompletableFuture
Sends a message activity to the sender of the incoming activity.
If the activity is successfully sent, the task result contains a ResourceResponse object containing the ID that the receiving channel assigned to the activity.
See the channel's documentation for limits imposed upon the contents of textReplyToSend.
Parameters:
sendActivity
public CompletableFuture
Sends a message activity to the sender of the incoming activity.
If the activity is successfully sent, the task result contains a ResourceResponse object containing the ID that the receiving channel assigned to the activity.
See the channel's documentation for limits imposed upon the contents of textReplyToSend.
To control various characteristics of your bot's speech such as voice, rate, volume, pronunciation, and pitch, specify speak in Speech Synthesis Markup Language (SSML) format.
Parameters:
sendActivity
public CompletableFuture
Sends a message activity to the sender of the incoming activity.
If the activity is successfully sent, the task result contains a ResourceResponse object containing the ID that the receiving channel assigned to the activity.
See the channel's documentation for limits imposed upon the contents of textReplyToSend.
To control various characteristics of your bot's speech such as voice, rate, volume, pronunciation, and pitch, specify speak in Speech Synthesis Markup Language (SSML) format.
Parameters:
setLocale
public void setLocale(String withLocale)
Set the locale on this context object.
Parameters:
updateActivity
public CompletableFuture
Replaces an existing activity.
If the activity is successfully sent, the task result contains a ResourceResponse object containing the ID that the receiving channel assigned to the activity.
Before calling this, set the ID of the replacement activity to the ID of the activity to replace.
Parameters: