Class ServerRouter

  • All Implemented Interfaces:
    Uniform

    public class ServerRouter
    extends Router
    Router that collects calls from all server connectors and dispatches them to the appropriate host routers. The host routers then dispatch them to the user applications. Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.
    • Field Detail

      • component

        private volatile Component component
        The parent component.
    • Constructor Detail

      • ServerRouter

        public ServerRouter​(Component component)
        Constructor.
        Parameters:
        component - The parent component.
    • Method Detail

      • getComponent

        private Component getComponent()
        Returns the parent component.
        Returns:
        The parent component.
      • logRoute

        protected void logRoute​(Route route)
        Description copied from class: Router
        Logs the route selected.
        Overrides:
        logRoute in class Router
        Parameters:
        route - The route selected.
      • start

        public void start()
                   throws java.lang.Exception
        Starts the Restlet.
        Overrides:
        start in class Router
        Throws:
        java.lang.Exception
      • stop

        public void stop()
                  throws java.lang.Exception
        Description copied from class: Router
        Stops the filter and the attached routes.
        Overrides:
        stop in class Router
        Throws:
        java.lang.Exception