RegisterClassMiddleware<T> Class
- java.
lang. Object - com.
microsoft. bot. builder. RegisterClassMiddleware<T>
- com.
Type Parameters
- T
The typeof service to add.
Implements
public class RegisterClassMiddleware<T>
implements Middleware
Middleware for adding an object to or registering a service with the current turn context.
Constructor Summary
| Constructor | Description |
|---|---|
| RegisterClassMiddleware(T service) |
Initializes a new instance of the Register |
| RegisterClassMiddleware(T service, String key) |
Initializes a new instance of the Register |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| T |
getService()
Gets the Service. |
| java.util.concurrent.CompletableFuture<java.lang.Void> |
onTurn(TurnContext turnContext, NextDelegate next)
Adds the associated object or service to the current turn context. |
| void |
setService(T withService)
Sets the Service. |
Methods inherited from java.lang.Object
Constructor Details
RegisterClassMiddleware
public RegisterClassMiddleware(T service)
Initializes a new instance of the RegisterClassMiddleware class.
Parameters:
RegisterClassMiddleware
public RegisterClassMiddleware(T service, String key)
Initializes a new instance of the RegisterClassMiddleware class.
Parameters:
Method Details
getService
public T getService()
Gets the Service.
Returns:
onTurn
public CompletableFuture
Adds the associated object or service to the current turn context.
Parameters:
setService
public void setService(T withService)
Sets the Service.
Parameters: