Input - handler input type.Output - handler output type.Self - of type Builder class.public static class BaseRequestHandlerChain.Builder<Input,Output,Self extends BaseRequestHandlerChain.Builder<Input,Output,Self>> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<GenericExceptionHandler<Input,Output>> |
exceptionHandlers
List of exception handlers.
|
protected GenericRequestHandler<Input,Output> |
handler
Request handler responsible for processing an incoming request.
|
protected List<GenericRequestInterceptor<Input>> |
requestInterceptors
List of request interceptors.
|
protected List<GenericResponseInterceptor<Input,Output>> |
responseInterceptors
List of response interceptors.
|
| Constructor and Description |
|---|
Builder()
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Self |
addExceptionHandler(GenericExceptionHandler<Input,Output> exceptionHandler)
Adds a single exception handler of type
GenericExceptionHandler to request handler chain. |
Self |
addRequestInterceptor(GenericRequestInterceptor<Input> requestInterceptor)
Adds a single request interceptor of type
GenericRequestInterceptor to request handler chain. |
Self |
addResponseInterceptor(GenericResponseInterceptor<Input,Output> responseInterceptor)
Adds a single response interceptor of type
GenericResponseInterceptor to request handler chain. |
BaseRequestHandlerChain<Input,Output> |
build()
Builder method constructs an instance of BaseRequestHandlerChain.
|
Self |
withExceptionHandlers(List<GenericExceptionHandler<Input,Output>> exceptionHandlers)
Adds multiple exception handlers of type
BaseRequestHandlerChain to request handler chain. |
Self |
withRequestHandler(GenericRequestHandler<Input,Output> handler)
Adds a request handler of type
GenericRequestHandler to request handler chain. |
Self |
withRequestInterceptors(List<GenericRequestInterceptor<Input>> requestInterceptors)
Adds multiple request interceptors of type
GenericRequestInterceptor to request handler chain. |
Self |
withResponseInterceptor(List<GenericResponseInterceptor<Input,Output>> responseInterceptors)
Adds multiple response interceptors of type
GenericResponseInterceptor to request handler chain. |
protected GenericRequestHandler<Input,Output> handler
protected List<GenericRequestInterceptor<Input>> requestInterceptors
protected List<GenericResponseInterceptor<Input,Output>> responseInterceptors
protected List<GenericExceptionHandler<Input,Output>> exceptionHandlers
public Self withRequestHandler(GenericRequestHandler<Input,Output> handler)
GenericRequestHandler to request handler chain.handler - request handler.BaseRequestHandlerChain.Builder.public Self addRequestInterceptor(GenericRequestInterceptor<Input> requestInterceptor)
GenericRequestInterceptor to request handler chain.requestInterceptor - request interceptor.BaseRequestHandlerChain.Builder.public Self withRequestInterceptors(List<GenericRequestInterceptor<Input>> requestInterceptors)
GenericRequestInterceptor to request handler chain.requestInterceptors - list of request interceptors.BaseRequestHandlerChain.Builder.public Self addResponseInterceptor(GenericResponseInterceptor<Input,Output> responseInterceptor)
GenericResponseInterceptor to request handler chain.responseInterceptor - response interceptor.BaseRequestHandlerChain.Builder.public Self withResponseInterceptor(List<GenericResponseInterceptor<Input,Output>> responseInterceptors)
GenericResponseInterceptor to request handler chain.responseInterceptors - list of response interceptors.BaseRequestHandlerChain.Builder.public Self withExceptionHandlers(List<GenericExceptionHandler<Input,Output>> exceptionHandlers)
BaseRequestHandlerChain to request handler chain.exceptionHandlers - list of exception handlers.BaseRequestHandlerChain.Builder.public Self addExceptionHandler(GenericExceptionHandler<Input,Output> exceptionHandler)
GenericExceptionHandler to request handler chain.exceptionHandler - exception handler.BaseRequestHandlerChain.Builder.public BaseRequestHandlerChain<Input,Output> build()
BaseRequestHandlerChain.Copyright © 2023. All rights reserved.