Input - Skill input type.Output - Skill output type.Self - of type AbstractSkillBuilder or any parent class of AbstractSkillBuilder.public abstract class AbstractSkillBuilder<Input,Output,Self extends AbstractSkillBuilder<Input,Output,Self>> extends Object
GenericExceptionHandler, GenericRequestHandler, GenericRequestInterceptor
and GenericResponseInterceptor| Modifier and Type | Field and Description |
|---|---|
protected List<GenericExceptionHandler<Input,Output>> |
exceptionHandlers
List of exception handlers.
|
protected List<GenericRequestHandler<Input,Output>> |
requestHandlers
List of request handlers.
|
protected List<GenericRequestInterceptor<Input>> |
requestInterceptors
List of request interceptors.
|
protected List<GenericResponseInterceptor<Input,Output>> |
responseInterceptors
List of response interceptors.
|
| Constructor and Description |
|---|
AbstractSkillBuilder()
Constructor to build an instance of AbstractSkillBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
Self |
addExceptionHandler(GenericExceptionHandler<Input,Output> handler)
Add an exception handler to Skill config.
|
Self |
addExceptionHandlers(GenericExceptionHandler<Input,Output>... handler)
Add multiple exception handlers to Skill config.
|
Self |
addExceptionHandlers(List<GenericExceptionHandler<Input,Output>> handlers)
Add multiple exception handlers to Skill config.
|
Self |
addRequestHandler(GenericRequestHandler<Input,Output> handler)
Add a request handler to Skill config.
|
Self |
addRequestHandlers(GenericRequestHandler<Input,Output>... handlers)
Add multiple request handlers to Skill config.
|
Self |
addRequestHandlers(List<GenericRequestHandler<Input,Output>> handlers)
Add multiple request handlers to Skill config.
|
Self |
addRequestInterceptor(GenericRequestInterceptor<Input> interceptor)
Add request interceptor to Skill config.
|
Self |
addRequestInterceptors(GenericRequestInterceptor<Input>... interceptors)
Add multiple request interceptors to Skill config.
|
Self |
addRequestInterceptors(List<GenericRequestInterceptor<Input>> interceptors)
Add multiple request interceptors to Skill config.
|
Self |
addResponseInterceptor(GenericResponseInterceptor<Input,Output> interceptor)
Add a response interceptor to Skill config.
|
Self |
addResponseInterceptors(GenericResponseInterceptor<Input,Output>... interceptors)
Add multiple response interceptors to Skill config.
|
Self |
addResponseInterceptors(List<GenericResponseInterceptor<Input,Output>> interceptors)
Add multiple response interceptors to Skill config.
|
protected abstract AlexaSkill |
build()
Abstract method to return an instance of AlexaSkill.
|
protected <T extends AbstractSkillConfiguration.Builder<Input,Output,T>> |
populateConfig(T config)
Adds config data to Skill configuration.
|
protected final List<GenericRequestHandler<Input,Output>> requestHandlers
protected final List<GenericExceptionHandler<Input,Output>> exceptionHandlers
protected final List<GenericRequestInterceptor<Input>> requestInterceptors
protected final List<GenericResponseInterceptor<Input,Output>> responseInterceptors
public AbstractSkillBuilder()
public Self addRequestHandler(GenericRequestHandler<Input,Output> handler)
handler - request handler.AbstractSkillBuilder.public Self addRequestHandlers(List<GenericRequestHandler<Input,Output>> handlers)
handlers - list of request handlers.AbstractSkillBuilder.public Self addRequestHandlers(GenericRequestHandler<Input,Output>... handlers)
handlers - request handlers.AbstractSkillBuilder.public Self addRequestInterceptor(GenericRequestInterceptor<Input> interceptor)
interceptor - request interceptor.AbstractSkillBuilder.public Self addRequestInterceptors(List<GenericRequestInterceptor<Input>> interceptors)
interceptors - list of request interceptors.AbstractSkillBuilder.public Self addRequestInterceptors(GenericRequestInterceptor<Input>... interceptors)
interceptors - request interceptors.AbstractSkillBuilder.public Self addResponseInterceptor(GenericResponseInterceptor<Input,Output> interceptor)
interceptor - response interceptor.AbstractSkillBuilder.public Self addResponseInterceptors(List<GenericResponseInterceptor<Input,Output>> interceptors)
interceptors - list of response interceptors.AbstractSkillBuilder.public Self addResponseInterceptors(GenericResponseInterceptor<Input,Output>... interceptors)
interceptors - response interceptors.AbstractSkillBuilder.public Self addExceptionHandler(GenericExceptionHandler<Input,Output> handler)
handler - exception handler.AbstractSkillBuilder.public Self addExceptionHandlers(List<GenericExceptionHandler<Input,Output>> handlers)
handlers - list of exception handlers.AbstractSkillBuilder.public Self addExceptionHandlers(GenericExceptionHandler<Input,Output>... handler)
handler - exception handlers.AbstractSkillBuilder.protected <T extends AbstractSkillConfiguration.Builder<Input,Output,T>> void populateConfig(T config)
T - config of type T.config - Skill config.protected abstract AlexaSkill build()
AlexaSkill.Copyright © 2023. All rights reserved.