Class RouterUtil


  • public class RouterUtil
    extends java.lang.Object
    Utility 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 int register​(Router router, java.lang.Object controller)
      Register the given controller to the specified router.
      static <T> int register​(Router router, T controller, java.lang.Class<T> clazz)
      Register the given controller to the specified router.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RouterUtil

        public RouterUtil()
    • 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 router
        controller - 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 router
        controller - the controller object
        clazz - the class of the type
        Returns:
        the count of the services just been registered