package tech.greenfield.vertx.irked;

import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpServerRequest;
import tech.greenfield.vertx.irked.exceptions.InvalidRouteConfiguration;

public class Irked {

	private Vertx vertx;

	public Irked(Vertx vertx) {
		this.vertx = vertx;
	}

	public Handler<HttpServerRequest> setupRequestHandler(Controller... apis) throws InvalidRouteConfiguration {
		Router router = new Router(vertx);
		for (Controller api : apis)
			router.configure(api);
		return router;
	}
	
	public static Router router(Vertx vertx) {
		return new Router(vertx);
	}
}

@@ -89,16 +89,54 @@
 .Vertx;%0A
+import io.vertx.core.http.HttpServer;%0A
 import i
@@ -250,332 +250,1679 @@
 n;%0A%0A
-public class Irked %7B%0A%0A%09private Vertx vertx;%0A%0A%09public Irked(Vertx vertx) %7B%0A%09%09this.vertx = vertx;%0A%09%7D%0A%0A%09public Handler%3CHttpServerRequest%3E setupRequestHandler(Controller... apis) throws InvalidRouteConfiguration %7B%0A%09%09Router router = new Router(vertx);%0A%09%09for (Controller api : apis)%0A%09%09%09router.configure(api);%0A%09%09return router;%0A%09%7D%0A%09
+/**%0A * Helper for creating Irked routers%0A * @author odeda%0A */%0Apublic class Irked %7B%0A%0A%09private Vertx vertx;%0A%0A%09/**%0A%09 * Vert.x-styled Irked factory method.%0A%09 * @param vertx Vert.x instance in which to generated routers%0A%09 * @return a new Irked instance that can generate %7B@link Router%7Ds and request handlers%0A%09 */%0A%09public static Irked irked(Vertx vertx) %7B%0A%09%09return new Irked(vertx);%0A%09%7D%0A%09%0A%09/**%0A%09 * Create new Irked instance that can generate request handlers%0A%09 * @deprecated please use %7B@link Irked#irked(Vertx)%7D instead%0A%09 * @param vertx Vert.x instance in which to generate routers%0A%09 */%0A%09public Irked(Vertx vertx) %7B%0A%09%09this.vertx = vertx;%0A%09%7D%0A%0A%09/**%0A%09 * Create an HTTP request handler, that can be used in %7B@link HttpServer#requestHandler()%7D,%0A%09 * with the provided set of APIs configured%0A%09 * @param apis set of Irked API controllers to configure routing for%0A%09 * @return an HTTP request handler for the Vert.x HTTP server%0A%09 * @throws InvalidRouteConfiguration in case one of the route configurations is invalid%0A%09 */%0A%09public Handler%3CHttpServerRequest%3E setupRequestHandler(Controller... apis) throws InvalidRouteConfiguration %7B%0A%09%09Router router = new Router(vertx);%0A%09%09for (Controller api : apis)%0A%09%09%09router.configure(api);%0A%09%09return router;%0A%09%7D%0A%09%0A%09/**%0A%09 * Create a new Irked router%0A%09 * @return router that can be used to configure Irked API controllers and handle HTTP requests from Vert.x HTTP server%0A%09 */%0A%09public Router router() %7B%0A%09%09return new Router(vertx);%0A%09%7D%0A%09%0A%09/**%0A%09 * Create a new Irked router%0A%09 * @param vertx Vert.x instance in which to generate routers%0A%09 * @return router that can be used to configure Irked API controllers and handle HTTP requests from Vert.x HTTP server%0A%09 */
 %0A%09pu

Add Vert.x stule factory method and javadocs