- 
- All Superinterfaces:
- BiConsumer<ServerRequest,ServerResponse>
 - All Known Subinterfaces:
- AccessLogEntry
 - All Known Implementing Classes:
- AbstractLogEntry,- ContextPropagationFilter,- CorsSupport,- FormParamsSupport,- HeaderLogEntry,- HostLogEntry,- JsonService,- RequestLineLogEntry,- RequestPredicate.ConditionalHandler,- SecurityHandler,- SizeLogEntry,- StatusLogEntry,- TimestampLogEntry,- TimeTakenLogEntry,- UserIdLogEntry,- UserLogEntry
 - Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
 @FunctionalInterface public interface Handler extends BiConsumer<ServerRequest,ServerResponse> - See Also:
- Routing.Builder,- Routing.Rules
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceHandler.EntityHandler<T>
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaccept(ServerRequest req, ServerResponse res)static <T> Handlercreate(Class<T> entityType, Handler.EntityHandler<T> entityHandler)Creates new instance of theHandlerfor the entity representing HTTP request content.static <T> Handlercreate(Class<T> entityType, Handler.EntityHandler<T> entityHandler, ErrorHandler<Throwable> entityReadErrorHandler)Creates new instance of theHandlerfor the entity representing HTTP request content.- 
Methods inherited from interface java.util.function.BiConsumerandThen
 
- 
 
- 
- 
- 
Method Detail- 
acceptvoid accept(ServerRequest req, ServerResponse res) - Specified by:
- acceptin interface- BiConsumer<ServerRequest,ServerResponse>
- Parameters:
- req- an HTTP server request.
- res- an HTTP server response.
 
 - 
createstatic <T> Handler create(Class<T> entityType, Handler.EntityHandler<T> entityHandler) Creates new instance of theHandlerfor the entity representing HTTP request content. SeeServerRequestfor more details how response can be represented as a java type.Created handler forwards any error created during entity read or conversion to the standard error handling ( ServerRequest.next(Throwable)).- Type Parameters:
- T- a type of the entity
- Parameters:
- entityType- a java type of the entity
- entityHandler- an entity handler to handle request entity
- Returns:
- new Handlerinstance
 
 - 
createstatic <T> Handler create(Class<T> entityType, Handler.EntityHandler<T> entityHandler, ErrorHandler<Throwable> entityReadErrorHandler) Creates new instance of theHandlerfor the entity representing HTTP request content. SeeServerRequestfor more details how response can be represented as a java type.- Type Parameters:
- T- a type of the entity
- Parameters:
- entityType- a java type of the entity
- entityHandler- an entity handler to handle request entity
- entityReadErrorHandler- an error handler to handle state when entity cannot be read or convert to the requested type
- Returns:
- new Handlerinstance
 
 
- 
 
-