public class HandlerInput extends Object
RequestHandler, ExceptionHandler,
RequestInterceptor, and ResponseInterceptor.
Contains the RequestEnvelope, AttributesManager,
ServiceClientFactory, ResponseBuilder,
and other useful utilities.| Modifier and Type | Class and Description |
|---|---|
static class |
HandlerInput.Builder |
| Modifier and Type | Method and Description |
|---|---|
static HandlerInput.Builder |
builder() |
AttributesManager |
getAttributesManager()
Returns an
AttributesManager which can be used to retrieve and store skill attributes. |
Optional<Object> |
getContext()
Optionally returns the container context.
|
com.amazon.ask.model.RequestEnvelope |
getRequestEnvelope()
Returns the
RequestEnvelope of the incoming request. |
ResponseBuilder |
getResponseBuilder()
Returns a
ResponseBuilder that can be used to construct a complete skill response containing speech,
directives, etc. |
com.amazon.ask.model.services.ServiceClientFactory |
getServiceClientFactory()
Returns a
ServiceClientFactory used to retrieve service client instances that can call Alexa APIs. |
boolean |
matches(Predicate<HandlerInput> predicate)
Evaluates a
Predicate against the current handler input state. |
public static HandlerInput.Builder builder()
public com.amazon.ask.model.RequestEnvelope getRequestEnvelope()
RequestEnvelope of the incoming request.public AttributesManager getAttributesManager()
AttributesManager which can be used to retrieve and store skill attributes.public Optional<Object> getContext()
Optional that may contain the container contextpublic com.amazon.ask.model.services.ServiceClientFactory getServiceClientFactory()
ServiceClientFactory used to retrieve service client instances that can call Alexa APIs.IllegalStateException - if this method is called when an ApiClient is
not configured on this SDK instance.public boolean matches(Predicate<HandlerInput> predicate)
Predicate against the current handler input state.predicate - predicate to evaluatepublic ResponseBuilder getResponseBuilder()
ResponseBuilder that can be used to construct a complete skill response containing speech,
directives, etc.Copyright © Amazon.com, Inc. or its affiliates. All Rights Reserved.