Package io.vertx.ext.web.api.service
Interface RouteToEBServiceHandler
-
- All Superinterfaces:
Handler<RoutingContext>
public interface RouteToEBServiceHandler extends 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 aServiceRequestobject through the event bus. The expected reply is aServiceResponse
This handler requires aValidationHandlerthat process request parameters, so they can be encapsulated by this handler inside theServiceRequest- Author:
- Francesco Guardiani @slinkydeveloper
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static RouteToEBServiceHandlerbuild(EventBus eventBus, String address, String actionName)Build a newRouteToEBServiceHandlerstatic RouteToEBServiceHandlerbuild(EventBus eventBus, String address, String actionName, DeliveryOptions deliveryOptions)Build a newRouteToEBServiceHandlerRouteToEBServiceHandlerextraPayloadMapper(Function<RoutingContext,JsonObject> extraPayloadMapper)WhenextraPayloadMapperis configured, this handler puts the evaluation result intoServiceRequest.getExtra()
-
-
-
Method Detail
-
extraPayloadMapper
RouteToEBServiceHandler extraPayloadMapper(Function<RoutingContext,JsonObject> extraPayloadMapper)
WhenextraPayloadMapperis configured, this handler puts the evaluation result intoServiceRequest.getExtra()- Parameters:
extraPayloadMapper- mapper- Returns:
-
build
static RouteToEBServiceHandler build(EventBus eventBus, String address, String actionName)
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:
-
-