AutoSaveStateMiddleware Class
- java.
lang. Object - com.
microsoft. bot. builder. AutoSaveStateMiddleware
- com.
Implements
public class AutoSaveStateMiddleware
implements Middleware
Middleware to automatically call .SaveChanges() at the end of the turn for all BotState class it is managing.
Constructor Summary
| Constructor | Description |
|---|---|
| AutoSaveStateMiddleware(BotState[] botStates) |
Initializes a new instance of the Auto |
| AutoSaveStateMiddleware(BotStateSet withBotStateSet) |
Initializes a new instance of the Auto |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Auto |
add(BotState botState)
Add a Bot |
|
Bot |
getBotStateSet()
Gets the list of state management objects managed by this object. |
| java.util.concurrent.CompletableFuture<java.lang.Void> |
onTurn(TurnContext turnContext, NextDelegate next)
Middleware implementation which calls saves |
| void |
setBotStateSet(BotStateSet withBotStateSet)
Gets the list of state management objects managed by this object. |
Methods inherited from java.lang.Object
Constructor Details
AutoSaveStateMiddleware
public AutoSaveStateMiddleware(BotState[] botStates)
Initializes a new instance of the AutoSaveStateMiddleware class.
Parameters:
AutoSaveStateMiddleware
public AutoSaveStateMiddleware(BotStateSet withBotStateSet)
Initializes a new instance of the AutoSaveStateMiddleware class.
Parameters:
Method Details
add
public AutoSaveStateMiddleware add(BotState botState)
Add a BotState to the list of sources to load.
Parameters:
Returns:
getBotStateSet
public BotStateSet getBotStateSet()
Gets the list of state management objects managed by this object.
Returns:
onTurn
public CompletableFuture
Middleware implementation which calls savesChanges automatically at the end of the turn.
Parameters:
Returns:
setBotStateSet
public void setBotStateSet(BotStateSet withBotStateSet)
Gets the list of state management objects managed by this object.
Parameters: