UserState Class
- java.
lang. Object - com.
microsoft. bot. builder. BotState - com.
microsoft. bot. builder. UserState
- com.
- com.
public class UserState
extends BotState
Handles persistence of a user state object using the user ID as part of the key.
Constructor Summary
| Constructor | Description |
|---|---|
| UserState(Storage withStorage) |
Creates a new UserState object. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| java.lang.String |
getStorageKey(TurnContext turnContext)
Gets the user key to use when reading and writing state to and from storage. |
Methods inherited from BotState
Methods inherited from java.lang.Object
Constructor Details
UserState
public UserState(Storage withStorage)
Creates a new UserState object.
Parameters:
Method Details
getStorageKey
public String getStorageKey(TurnContext turnContext)
Gets the user key to use when reading and writing state to and from storage.
Overrides:
UserState.getStorageKey(TurnContext turnContext)Parameters:
Returns:
Throws: