anchor.diff:  
   library clean_router.server;
   
  -//TODO Should we match HttpRequest with not set method?
  -//TODO How we should handle uri parameters?
  -//TODO   should handler be an abstract class / interface?
   //TODO Filters
   
   import "dart:core";
  
positive.code: import 'common.dart';
  export 'common.dart';
  
  class _ServerRoute{
    final String routeName;
    final String method;
  
    _ServerRoute(this.routeName, this.method);
  
    bool operator ==(_ServerRoute other) => (this.routeName == other.routeName &&
        this.method == other.method);
  
    String toString() => routeName + ":" + method;
  
    int get hashCode => toString.hashCode;
  }
  
  /**
   * [RequestNavigator] wires together [Route] matching, [Filter]ing of [HttpRequests]
   * and [Handler] calling. It manages url addresses and bind them handlers.
   */
  class RequestNavigator {
    final Stream<HttpRequest> _incoming;
    final Router _router;
    final Map<_ServerRoute, StreamController<HttpRequest>> _streams = {};
  
    /**
     * Contains [Route], [Filter], [Stream] triples where [Stream] has at least one handler.
     */
    final List _filters = [];
  
    final _ServerRoute _defaultServerRouteId = new _ServerRoute('default', '');
  
    /**
     * Creates new RequestNavigator listening on [_incoming].
     */
    RequestNavigator(this._incoming, this._router){
      this._incoming.listen(navigate);
    }
  
    StreamController _createStreamControllerWithHandler(dynamic handler){
      StreamController<HttpRequest> streamController = new StreamController<HttpRequest>();
      streamController.stream.listen(handler);
      return streamController;
    }
  
negative.code:    * whole [HttpRequest] is filtered through [Filter] and if passes all then
     * [HttpRequest] is inserted to the correspondig [Stream].
     */
    void navigate(HttpRequest req){
      var matchInfo = _router.match(req.uri.path);
      if(matchInfo != null){
        if(_streams.containsKey(matchInfo[0])){
          _streams[matchInfo[0]].add(new RequestHandlerParameters(req, matchInfo[1]));
        }
        else{
          throw new ArgumentError("Stream not found for '${matchInfo[0]}'");
        }
      }
      else{
        _defaultStreamController.add(new RequestHandlerParameters(req, {}));
      }
    }
  }
  