Class RouterUtil
- java.lang.Object
-
- com.github.fmjsjx.libnetty.http.server.middleware.RouterUtil
-
public class RouterUtil extends java.lang.ObjectUtility class for HTTP controller beans.- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description RouterUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intregister(Router router, java.lang.Object controller)Register the given controller to the specified router.static <T> intregister(Router router, T controller, java.lang.Class<T> clazz)Register the given controller to the specified router.
-
-
-
Method Detail
-
register
public static final int register(Router router, java.lang.Object controller)
Register the given controller to the specified router.- Parameters:
router- the routercontroller- the controller object- Returns:
- the count of the services just been registered
-
register
public static final <T> int register(Router router, T controller, java.lang.Class<T> clazz)
Register the given controller to the specified router.- Type Parameters:
T- the type of the controller- Parameters:
router- the routercontroller- the controller objectclazz- the class of the type- Returns:
- the count of the services just been registered
-
-