public class DefaultRequestDispatcher extends Object implements RequestDispatcher
RequestMapper this class tries to find
a handler for a request, then delegates the invocation to a HandlerAdapter that
supports such a handler.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultRequestDispatcher.Builder |
| Modifier and Type | Field and Description |
|---|---|
protected ExceptionMapper |
exceptionMapper |
protected Collection<HandlerAdapter> |
handlerAdapters |
protected Collection<RequestMapper> |
requestMappers |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultRequestDispatcher(Collection<HandlerAdapter> handlerAdapters,
Collection<RequestMapper> requestMappers,
ExceptionMapper exceptionMapper) |
| Modifier and Type | Method and Description |
|---|---|
static DefaultRequestDispatcher.Builder |
builder() |
Optional<com.amazon.ask.model.Response> |
dispatch(HandlerInput input)
Dispatches an incoming request to the appropriate request handler and returns the output
|
protected final Collection<HandlerAdapter> handlerAdapters
protected final Collection<RequestMapper> requestMappers
protected final ExceptionMapper exceptionMapper
protected DefaultRequestDispatcher(Collection<HandlerAdapter> handlerAdapters, Collection<RequestMapper> requestMappers, ExceptionMapper exceptionMapper)
public Optional<com.amazon.ask.model.Response> dispatch(HandlerInput input) throws AskSdkException
RequestDispatcherdispatch in interface RequestDispatcherinput - input to the dispatcher containing incoming request and other contextAskSdkException - when an exception occurs during request processingpublic static DefaultRequestDispatcher.Builder builder()
Copyright © 2018. All rights reserved.