Interface RouteToEBServiceHandler
- All Superinterfaces:
Handler<RoutingContext>
Handler that proxy the request to an event bus endpoint, waits for the reply and then writes the HTTP response.
The HTTP request is sent encapsulated into a
This handler requires a
The HTTP request is sent encapsulated into a
ServiceRequest object through the event bus. The expected reply is a ServiceResponse This handler requires a
ValidationHandler that process request parameters, so they can be encapsulated by this handler inside the ServiceRequest- Author:
- Francesco Guardiani @slinkydeveloper
-
Method Summary
Modifier and TypeMethodDescriptionstatic RouteToEBServiceHandlerBuild a newRouteToEBServiceHandlerstatic RouteToEBServiceHandlerbuild(EventBus eventBus, String address, String actionName, DeliveryOptions deliveryOptions) Build a newRouteToEBServiceHandlerextraPayloadMapper(Function<RoutingContext, JsonObject> extraPayloadMapper) WhenextraPayloadMapperis configured, this handler puts the evaluation result intoServiceRequest.getExtra()
-
Method Details
-
extraPayloadMapper
WhenextraPayloadMapperis configured, this handler puts the evaluation result intoServiceRequest.getExtra()- Parameters:
extraPayloadMapper- mapper- Returns:
-
build
Build a newRouteToEBServiceHandler- Parameters:
eventBus- Vert.x event bus instanceaddress- Event bus endpoint addressactionName- action name of the endpoint. This will be configured asDeliveryOptionsheader namedaction- Returns:
-
build
static RouteToEBServiceHandler build(EventBus eventBus, String address, String actionName, DeliveryOptions deliveryOptions) Build a newRouteToEBServiceHandler- Parameters:
eventBus- Vert.x event bus instanceaddress- Event bus endpoint addressactionName- action name of the endpoint. This will be configured asDeliveryOptionsheader namedactiondeliveryOptions- delivery options that will be always sent with the request- Returns:
-