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 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

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static RouteToEBServiceHandler` | `build(EventBus eventBus, String address, String actionName)` Build a new `RouteToEBServiceHandler`
    `static RouteToEBServiceHandler` | `build(EventBus eventBus, String address, String actionName, DeliveryOptions deliveryOptions)` Build a new `RouteToEBServiceHandler`
    `RouteToEBServiceHandler` | `extraPayloadMapper(java.util.function.Function<RoutingContext,JsonObject> extraPayloadMapper)` When `extraPayloadMapper` is configured, this handler puts the evaluation result into `ServiceRequest.getExtra()`

    - ### Methods inherited from interface io.vertx.core.Handler

      `handle`

- - ### Method Detail

    - #### extraPayloadMapper

          RouteToEBServiceHandler extraPayloadMapper(java.util.function.Function<RoutingContext,JsonObject> extraPayloadMapper)

      When `extraPayloadMapper` is configured, this handler puts the evaluation result into `ServiceRequest.getExtra()`
      Parameters:
        `extraPayloadMapper` - mapper
      Returns:

    - #### build

          static RouteToEBServiceHandler build(EventBus eventBus,
                                               String address,
                                               String actionName)

      Build a new `RouteToEBServiceHandler`
      Parameters:
        `eventBus` - Vert.x event bus instance
        `address` - Event bus endpoint address
        `actionName` - action name of the endpoint. This will be configured as `DeliveryOptions` header named `action`
      Returns:

    - #### build

          static RouteToEBServiceHandler build(EventBus eventBus,
                                               String address,
                                               String actionName,
                                               DeliveryOptions deliveryOptions)

      Build a new `RouteToEBServiceHandler`
      Parameters:
        `eventBus` - Vert.x event bus instance
        `address` - Event bus endpoint address
        `actionName` - action name of the endpoint. This will be configured as `DeliveryOptions` header named `action`
        `deliveryOptions` - delivery options that will be always sent with the request
      Returns:

Copyright © 2021 Eclipse. All rights reserved.