Class RouteToEBServiceHandler

java.lang.Object
io.vertx.mutiny.ext.web.api.service.RouteToEBServiceHandler
All Implemented Interfaces:
MutinyDelegate, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>

public class RouteToEBServiceHandler extends Object implements MutinyDelegate, io.vertx.core.Handler<RoutingContext>, Consumer<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

NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

  • Field Details

  • Constructor Details

    • RouteToEBServiceHandler

      public RouteToEBServiceHandler(io.vertx.ext.web.api.service.RouteToEBServiceHandler delegate)
    • RouteToEBServiceHandler

      public RouteToEBServiceHandler(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.web.api.service.RouteToEBServiceHandler getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • handle

      public void handle(RoutingContext arg0)
      Specified by:
      handle in interface io.vertx.core.Handler<RoutingContext>
    • extraPayloadMapper

      public RouteToEBServiceHandler extraPayloadMapper(Function<RoutingContext,io.vertx.core.json.JsonObject> extraPayloadMapper)
      Parameters:
      extraPayloadMapper - mapper
      Returns:
    • build

      public static RouteToEBServiceHandler build(EventBus eventBus, String address, String actionName)
      Parameters:
      eventBus - Vert.x event bus instance
      address - Event bus endpoint address
      actionName - action name of the endpoint. This will be configured as header named action
      Returns:
    • build

      public static RouteToEBServiceHandler build(EventBus eventBus, String address, String actionName, io.vertx.core.eventbus.DeliveryOptions deliveryOptions)
      Parameters:
      eventBus - Vert.x event bus instance
      address - Event bus endpoint address
      actionName - action name of the endpoint. This will be configured as header named action
      deliveryOptions - delivery options that will be always sent with the request
      Returns:
    • accept

      public void accept(RoutingContext item)
      Specified by:
      accept in interface Consumer<RoutingContext>
    • newInstance

      public static RouteToEBServiceHandler newInstance(io.vertx.ext.web.api.service.RouteToEBServiceHandler arg)