Input
- handler input type.Output
- handler output type.public class BaseRequestMapper<Input,Output> extends Object implements GenericRequestMapper<Input,Output>
GenericRequestHandlerChain
instances in the order they were provided.
Suitable chains are identified by calling canHandle on the attached GenericRequestHandler
.Modifier and Type | Class and Description |
---|---|
static class |
BaseRequestMapper.Builder<Input,Output,Self extends BaseRequestMapper.Builder<Input,Output,Self>>
Base Request Mapper Builder.
|
Modifier and Type | Field and Description |
---|---|
protected List<BaseRequestHandlerChain<Input,Output>> |
handlerChains
List of handler chains.
|
Modifier | Constructor and Description |
---|---|
protected |
BaseRequestMapper(List<BaseRequestHandlerChain<Input,Output>> handlerChains)
Constructor for BaseRequestMapper.
|
Modifier and Type | Method and Description |
---|---|
static <Input,Output> |
builder()
Returns an instance of Builder.
|
static <Input,Output,Self extends BaseRequestMapper.Builder<Input,Output,Self>> |
forTypes(Class<Input> input,
Class<Output> output)
Returns an instance of Builder.
|
Optional<GenericRequestHandlerChain<Input,Output>> |
getRequestHandlerChain(Input input)
Finds a
GenericRequestHandlerChain containing a request handler that is suitable for the incoming request. |
protected final List<BaseRequestHandlerChain<Input,Output>> handlerChains
protected BaseRequestMapper(List<BaseRequestHandlerChain<Input,Output>> handlerChains)
handlerChains
- list of handler chains.public Optional<GenericRequestHandlerChain<Input,Output>> getRequestHandlerChain(Input input)
GenericRequestHandlerChain
containing a request handler that is suitable for the incoming request..getRequestHandlerChain
in interface GenericRequestMapper<Input,Output>
input
- handler inputOptional
containing the request handler chain if one is located, or empty if not.public static <Input,Output,Self extends BaseRequestMapper.Builder<Input,Output,Self>> BaseRequestMapper.Builder<Input,Output,Self> forTypes(Class<Input> input, Class<Output> output)
Input
- handler input type.Output
- handler output type.Self
- of type Builder.input
- class of type Inputoutput
- class of type OutputBaseRequestMapper.Builder
.public static <Input,Output> BaseRequestMapper.Builder<Input,Output,?> builder()
Input
- handler input type.Output
- handler output type.BaseRequestMapper.Builder
.Copyright © 2023. All rights reserved.