org.restlet.engine.component
Class ServerRouter

java.lang.Object
  extended by org.restlet.Restlet
      extended by org.restlet.routing.Router
          extended by org.restlet.engine.component.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.

Author:
Jerome Louvel

Field Summary
 
Fields inherited from class org.restlet.routing.Router
MODE_BEST_MATCH, MODE_CUSTOM, MODE_FIRST_MATCH, MODE_LAST_MATCH, MODE_NEXT_MATCH, MODE_RANDOM_MATCH
 
Constructor Summary
ServerRouter(Component component)
          Constructor.
 
Method Summary
protected  void logRoute(Route route)
           
 void start()
          Starts the Restlet.
 void stop()
           
 
Methods inherited from class org.restlet.routing.Router
attach, attach, attach, attach, attach, attach, attachDefault, attachDefault, createRoute, createRoute, detach, detach, doHandle, getCustom, getDefaultMatchingMode, getDefaultMatchingQuery, getDefaultRoute, getMatchingMode, getMaxAttempts, getNext, getRequiredScore, getRetryDelay, getRoutes, getRoutingMode, handle, setDefaultMatchingMode, setDefaultMatchingQuery, setDefaultRoute, setMaxAttempts, setRequiredScore, setRetryDelay, setRoutes, setRoutingMode
 
Methods inherited from class org.restlet.Restlet
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerRouter

public ServerRouter(Component component)
Constructor.

Parameters:
component - The parent component.
Method Detail

logRoute

protected void logRoute(Route route)
Overrides:
logRoute in class Router

start

public void start()
           throws Exception
Starts the Restlet.

Overrides:
start in class Router
Throws:
Exception

stop

public void stop()
          throws Exception
Overrides:
stop in class Router
Throws:
Exception


Copyright © 2005-2013 Restlet.