All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.up.uca.rs.router.UriHub Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.uca.rs.router;

import io.vertx.ext.web.Route;
import io.vertx.up.atom.agent.Event;

/**
 * Hub for Uri basic
 * path, method, order
 * register to route to generate mime support
 */
public class UriHub implements Hub {

    @Override
    public void mount(final Route route,
                      final Event event) {
        if (null == event.getMethod()) {
            // Support filter JSR340
            route.path(event.getPath())
                    .order(event.getOrder());
        } else {
            route.path(event.getPath())
                    .method(event.getMethod())
                    .order(event.getOrder());
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy