@Requires(beans=com.fasterxml.jackson.databind.ObjectMapper.class) @Requires(property="alexa.endpoint.enabled",notEquals="false")
@Controller(value="${alexa.endpoint.path:/alexa}")
public class SkillController
extends java.lang.Object
This class takes care of the JSON serialization / deserialization of the HTTP body and the
invocation of the right method of the provided Skill
. It also handles sending back
modified session attributes, user attributes and authentication tokens when needed and handles
exception cases.
Constructor and Description |
---|
SkillController(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
RequestEnvelopeVerificationService requestEnvelopeVerificationService,
RequestEnvelopeService requestEnvelopeService)
Constructor to build an instance of SkillServlet.
|
Modifier and Type | Method and Description |
---|---|
io.micronaut.http.HttpResponse |
doPost(io.micronaut.http.HttpHeaders httpHeaders,
java.lang.String body)
Handles a POST request.
|
public SkillController(com.fasterxml.jackson.databind.ObjectMapper objectMapper, RequestEnvelopeVerificationService requestEnvelopeVerificationService, RequestEnvelopeService requestEnvelopeService)
objectMapper
- Jackson Object MapperrequestEnvelopeVerificationService
- Request Envelope verification servicerequestEnvelopeService
- Request Envelope Service@Post public io.micronaut.http.HttpResponse doPost(io.micronaut.http.HttpHeaders httpHeaders, @Body java.lang.String body)
Skill
.httpHeaders
- HTTP Headersbody
- HTTP Request Body byte array