com.github.lontime.exthttp.container.HttpRouteInterface Maven / Gradle / Ivy
package com.github.lontime.exthttp.container;
import com.github.lontime.base.commonj.components.ComponentInterface;
import com.github.lontime.base.commonj.constants.Consts;
import reactor.netty.http.server.HttpServerRoutes;
/**
* HttpRouteInterface.
* @author lontime
* @since 1.0
*/
public interface HttpRouteInterface extends ComponentInterface {
/**
* getName.
* @return name
*/
@Override
default String getName() {
return Consts.DEFAULT_OBJECT_NAME;
}
/**
* getClazz.
* @return Class
*/
@Override
default Class> getClazz() {
return HttpRouteInterface.class;
}
/**
* handle.
* @param routes routes
*/
default void handle(HttpServerRoutes routes) {
throw new UnsupportedOperationException("Cannot call handle() on " + this.getClass().getSimpleName());
}
}