

package org.jacpfx.vxms.spi;

import io.vertx.core.AbstractVerticle;
import io.vertx.ext.web.Router;
import org.jacpfx.vxms.common.VxmsShared;

/**
 * Created by amo on 05.08.16.
 * Defines SPI to bootstrap a vxms rest API
 */
public interface RESThandlerSPI {

  /**
   * initialize a rest API
   *
   * @param vxmsShared the vxmsShared instance, containing the Vertx instance and other shared
   * objects per instance
   * @param router the vertx web router
   * @param service the verticle to be applied
   */
  void initRESTHandler(VxmsShared vxmsShared, Router router, AbstractVerticle service);

  /**
   * initialize a rest API
   *
   * @param vxmsShared the vxmsShared instance, containing the Vertx instance and other shared
   * objects per instance
   * @param router the vertx web router
   * @param service the verticle to be applied
   * @param routes the user-defined routes
   */
  void initRESTHandler(VxmsShared vxmsShared, Router router,  AbstractVerticle service,VxmsRoutes ...routes);
}
